您的位置:首页 > 其它

TS的EL策略实现一半

2016-07-17 17:29 316 查看
Input : price(c),length(26),length2(2);

Var : MID(0),TMP(0),TOP(0),BOTTOM(0),MID2(0),TMP2(0),TOP2(0),BOTTOM2(0),MID3(0),TMP3(0),TOP3(0),BOTTOM3(0);

MID = average(C,length);

TMP = stddev(C,length);

TOP = MID + length2*TMP;

BOTTOM = MID - length2*TMP;

MID2 = average(C of data2,length);

TMP2 = stddev(C of data2,length);

TOP2 = MID + length2*TMP2;

BOTTOM2 = MID - length2*TMP2;

MID3 = average(C of data3,length);

TMP3 = stddev(C of data3,length);

TOP3 = MID + length2*TMP3;

BOTTOM3 = MID - length2*TMP3;

 

Plot1(TOP,"BOLL_top");

Plot2(MID,"BOLL_mid");

plot3(BOTTOM,"BOLL_bottom");

Condition1 = high[1]<top and high[0]>=top and high[0] > mid;

Condition2 = high[1]<top2 and high[0]>=top2 and high[0] > mid2;

Condition3 = high[1]<top3 and high[0]>=top3 and high[0] > mid3;

If condition1 AND condition2 and condition3 then

   Begin

     //为这些K线着色

     SetPlotColor(1, Cyan);

   End;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: