Oscar G Cagigas' article, “The Degree of Complexity”, discussed
how simpler systems can perform better than more complex ones. The formulas for
his basic Donchian Channel system are below:
Buy Order:
Len1:= OPT1;
Len2:= OPT2;
el:= h > ref(hhv(H,len1),-1);
es:= L < ref(llv(L,len1),-1);
xl:= L < ref(llv(L,len2),-1);
xs:= h > ref(hhv(H,len2),-1);
trade:= if(el, 1, if(es, -1,
if((prev=1 and xl) or (prev=-1 and xs), 0, prev)));
trade=1 and ref(trade<>1, -1)
Sell Order:
Len1:= OPT1;
Len2:= OPT2;
el:= h > ref(hhv(H,len1),-1);
es:= L < ref(llv(L,len1),-1);
xl:= L < ref(llv(L,len2),-1);
xs:= h > ref(hhv(H,len2),-1);
trade:= if(el, 1, if(es, -1,
if((prev=1 and xl) or (prev=-1 and xs), 0, prev)));
trade=0 and ref(trade=1, -1)
Sell Short Order:
Len1:= OPT1;
Len2:= OPT2;
el:= h > ref(hhv(H,len1),-1);
es:= L < ref(llv(L,len1),-1);
xl:= L < ref(llv(L,len2),-1);
xs:= h > ref(hhv(H,len2),-1);
trade:= if(el, 1, if(es, -1,
if((prev=1 and xl) or (prev=-1 and xs), 0, prev)));
trade=-1 and ref(trade<>-1, -1)
Buy to Cover Order:
Len1:= OPT1;
Len2:= OPT2;
el:= h > ref(hhv(H,len1),-1);
es:= L < ref(llv(L,len1),-1);
xl:= L < ref(llv(L,len2),-1);
xs:= h > ref(hhv(H,len2),-1);
trade:= if(el, 1, if(es, -1,
if((prev=1 and xl) or (prev=-1 and xs), 0, prev)));
trade=0 and ref(trade=-1, -1)
Optimizations:
OPT1:
Description: long
term
Minimum: 20
Maximum: 40
Step : 5
OPT2:
Description: short
term
Minimum: 5
Maximum: 20
Step : 5