Perry Kaufman's article, “Slope Divergence: Capitalizing on
Uncertainty”, described a divergence trading system. The formulas for this system
are listed below:
Buy Order:
tpm:= 25;
tp1:= 5;
tp2:= 12;
tp3:= 14;
mi:= Stoch(tpm, 1);
md1:= linregslope(mi, tp1);
md2:= linregslope(mi, tp2);
md3:= linregslope(mi, tp3);
pd1:= linregslope(c, tp1);
pd2:= linregslope(c, tp2);
pd3:= linregslope(c, tp3);
((md1<0) + (md2<0) + (md3<0) >= 2) AND
((pd1>0) + (pd2>0) + (pd3>0) >= 2)
Sell Order:
tpm:= 25;
tp1:= 5;
tp2:= 12;
tp3:= 14;
mi:= Stoch(tpm, 1);
md1:= linregslope(mi, tp1);
md2:= linregslope(mi, tp2);
md3:= linregslope(mi, tp3);
pd1:= linregslope(c, tp1);
pd2:= linregslope(c, tp2);
pd3:= linregslope(c, tp3);
min(md1, min(md2, min(md3, min(pd1, min(pd2, pd3))))) >0
OR
max(md1, max(md2, max(md3, max(pd1, max(pd2, pd3))))) <0
Sell Short Order:
tpm:= 25;
tp1:= 5;
tp2:= 12;
tp3:= 14;
mi:= Stoch(tpm, 1);
md1:= linregslope(mi, tp1);
md2:= linregslope(mi, tp2);
md3:= linregslope(mi, tp3);
pd1:= linregslope(c, tp1);
pd2:= linregslope(c, tp2);
pd3:= linregslope(c, tp3);
((md1>0) + (md2>0) + (md3>0) >= 2) AND
((pd1<0) + (pd2<0) + (pd3<0) >= 2)
Buy to CovrOrder:
tpm:= 25;
tp1:= 5;
tp2:= 12;
tp3:= 14;
mi:= Stoch(tpm, 1);
md1:= linregslope(mi, tp1);
md2:= linregslope(mi, tp2);
md3:= linregslope(mi, tp3);
pd1:= linregslope(c, tp1);
pd2:= linregslope(c, tp2);
pd3:= linregslope(c, tp3);
min(md1, min(md2, min(md3, min(pd1, min(pd2, pd3))))) >0
OR
max(md1, max(md2, max(md3, max(pd1, max(pd2, pd3)))))
<0