Trading Trendline Breaks, part 2
In his article "Trading Trendline Breaks, Part 2," Sylvain Vervoort demonstrates techniques on how to apply breaks in trendlines to your market analysis and trading.
Tradecision's Strategy Builder enables you to recreate the Trading
Trendline Breaks system based on the concept explained
by Vervoort in his article.
Entry Long
var
zz0:=Zig(0.001, PERCENT);
zz1:=zz0\1\;
zz2:=zz0\2\;
tr:=ValueWhen( zz0 >zz1 and zz1 < zz2, zz1);
pk:=ValueWhen( zz0 < zz1 and zz1 >zz2, zz1);
PU:=tr + Abs(tr) * 0.0005;
PD:=pk - Abs(pk) * 0.0005;
res:=iff(Close >= PU and zz0 >zz1, 1, iff(Close <= PD and zz0 < zz1, -1, 0));
res_1:=iff(res <> 0, res, NthValueWhen(1, res <> 0, res));
end_var
println(0,res_1);
return res_1 = 1 and res_1\1\ = -1;
Entry Short
var
zz0:=Zig(0.001, PERCENT);
zz1:=zz0\1\;
zz2:=zz0\2\;
tr:=ValueWhen( zz0 >zz1 and zz1 < zz2, zz1);
pk:=ValueWhen( zz0 < zz1 and zz1 >zz2, zz1);
PU:=tr + Abs(tr) * 0.0005;
PD:=pk - Abs(pk) * 0.0005;
res:=iff(Close >= PU and zz0 >zz1, 1, iff(Close <= PD and zz0 < zz1, -1, 0));
res_1:=iff(res <> 0, res, ValueWhen( res <> 0, res));
end_var
return res_1 = -1 and res_1\1\ = 1;
|