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;
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;
相关文章推荐
- ubuntu 開啟ssh 遠程鏈接
- 解决aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: Nosuchfile
- 279. Perfect Squares
- 滴滴出行分而治之的架构设计之道
- vim配置文件
- replace ollydbg's WNDPROC on OD's plugin
- 2. crontab 的使用
- 语音信号的预加重和加窗处理
- UILabel,文字添加下划线,中划线
- 国内公共DNS
- hdu4352 XHXJ's LIS(数位Dp)
- Docker安装及镜像管理
- 如何计算两个文档的相似度(一)
- 《linux学习》之怎么安装搜狗输入法
- Linux多线程与同步
- iOS获取经纬度
- Android 自定义View (一)
- 专访腾讯徐汉彬:架构、优化环环相扣,日请求8亿只是起点
- 杭电oj -1008
- ARP协议学习