TS的EL策略实现一半

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;
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值