If after X-period there is breakout above or start above then buy
If after X-period there is a breakout below or starr below then sell
Input:
Len(15),
//15~30(1);
X_Bar(2),//1~6(1);
X_range(1.2);//0.2~2(0.2)
vars :
HighBO(false),LowBO(false),x(0),HighBOPrice(0),LowBOPrice(0);
HighBOPrice = Highest(high,Len)[1];
LowBOPrice = Lowest(low,Len)[1];
HighBO = high > HighBOPrice;
LowBO = low < LowBOPrice;
if HighBO[X_Bar] then Buy("B", atstop, HighBOPrice[X_Bar] + X_range );
if
LowBO[X_Bar] then Sell("S", atstop, LowBOPrice[X_Bar] - X_range );
No comments:
Post a Comment