中长线波段副图通达信指标 副图 源码附图
VAR1:=1;
VAR2:=IF(MONTH< 12,1,100000);
VAR3:=(2*CLOSE+HIGH+LOW)/4;
VAR4:=LLV(LOW,34);
VAR5:=HHV(HIGH,34);
DIF:EMA((VAR3-VAR4)/(VAR5-VAR4)*100,13),LINETHICK2;
DEA:EMA(0.667*REF(DIF,1)+0.333*DIF,2),LINETHICK1;
QS:IF(CROSS(DIF,DEA) AND DIF< 40,25,10),COLORRED;
买入:QS=25 AND CROSS(MA(CLOSE,5),MA(CLOSE,10)),LINETHICK0;
DRAWTEXT(CROSS(DIF,DEA) AND DIF< 22,20,'波谷'),COLORGREEN;
DRAWICON(CROSS(DIF,DEA) AND DIF< 22,25,1);
DRAWTEXT(CROSS(DIF,30) AND DEA< DIF,40,'初波段'),COLORWHITE;
DRAWICON(CROSS(DIF,30) AND DEA< DIF,35,1);
DRAWTEXT(CROSS(DIF,65) AND DEA< DIF,55,'中波段'),COLORFF00FF;
DRAWICON(CROSS(DIF,65) AND DEA< DIF,70,2);
DRAWTEXT(CROSS(DIF,75) AND DEA< DIF,67,'高波段'),COLORYELLOW;
DRAWICON(CROSS(DIF,75) AND DEA< DIF,80,2);
DRAWTEXT(CROSS(DEA,DIF) AND DEA>75,80,'波峰'),COLORRED;
DRAWICON(CROSS(DEA,DIF) AND DEA>75,85,2);
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
VAR1赋值:1
如果MONTH< 12返回1否则返回100000
VAR3赋值:(2*收盘价+最高价+最低价)/4
VAR4赋值:34日内最低价最低值
VAR5赋值:34日内最高价最高值
输出DIF:EMA((VAR3-VAR4)/(VAR5-VAR4)*100,13), 线宽为2
输出DEA:E0.667*1日前的DIF+0.333*DIF的2日简单移动平均,LINETHICK1
输出QS:IF(DIF上穿DEA AND DIF< 40,25,10),画红色
输出买入:QS=25 AND CROSS(收盘价的5日简单移动平均,收盘价的10日简单移动平均),LINETHICK0
DRAWTEXT(DIF上穿DEA AND DIF< 22,20,'波谷'),画绿色
DRAWICON(DIF上穿DEA AND DIF< 22,25,1)
DRAWTEXT(DIF上穿30 AND DEA< DIF,40,'初波段'),画白色
DRAWICON(DIF上穿30 AND DEA< DIF,35,1)
DRAWTEXT(DIF上穿65 AND DEA< DIF,55,'中波段'),COLORFF00FF
DRAWICON(DIF上穿65 AND DEA< DIF,70,2)
DRAWTEXT(DIF上穿75 AND DEA< DIF,67,'高波段'),画黄色
DRAWICON(DIF上穿75 AND DEA< DIF,80,2)
DRAWTEXT(DEA上穿DIF AND DEA>75,80,'波峰'),画红色
DRAWICON(DEA上穿DIF AND DEA>75,85,2)