通达信公式笑脸买入副图
买:=IF("KDJ.J"(27,3,3)<0,10,0);
条件:=CROSS(9.9,买);
VAR1:=(2*CLOSE+HIGH+LOW)/4;
VAR2:=LLV(LOW,5);
VAR3:=HHV(HIGH,5);
VAR4:=EMA((VAR1-VAR2)/(VAR3-VAR2)*100,5);
MA1:=MA(VAR4,2);{}
AA:STICKLINE(VAR4>MA1,VAR4,MA1,3,1),COLORRED;
AAA:IF(VAR4>MA1,VAR4,MA1),COLORRED;
BBB:=STICKLINE(VAR4>MA1 AND REF(VAR4,1)<30,VAR4,MA1,3,1),COLORRED;
STICKLINE(VAR4<=MA1,VAR4,MA1,3,1),COLORFFCC66;
DRAWICON(CROSS(9.9,买),VAR4-12,5);
STICKLINE(CROSS(9.9,买),VAR4+5,MA1-4,3,1),COLORYELLOW;
XXX:=STICKLINE(BBB,VAR4+5,MA1-4,3,1),COLORYELLOW;
STICKLINE(FILTER(XXX ,5) ,VAR4+5,MA1-4,3,1),COLORYELLOW;
V20:20,COLOR00FF00;
V50:50,COLOR00FF00;
V80:80,COLOR00FF00;
卖:=IF("KDJ.J"(27,3,3)>100,90,100);
DRAWICON(CROSS(卖,99.9),VAR4+12,6);
CCC:=VAR4>MA1 AND REF(VAR4,1)>70;
STICKLINE(CROSS(卖,99.9),VAR4,MA1-9,3,1),COLORGREEN;
YYY:=STICKLINE(CCC,VAR4+5,MA1-4,3,1),COLORGREEN;
STICKLINE(FILTER(YYY ,5) ,VAR4+5,MA1-4,3,1),COLORGREEN;
DRAWTEXT(FILTER(BBB,5),VAR4-8,'买'),COLORRED;
DRAWTEXT(FILTER(CCC,5),VAR4+8,'卖'),COLORGREEN;
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
买赋值:IF("KDJ.J"(27,3,3)<0,10,0)
条件赋值:9.9上穿买
VAR1赋值:(2*收盘价+最高价+最低价)/4
VAR2赋值:5日内最低价最低值
VAR3赋值:5日内最高价最高值
VAR4赋值:EMA((VAR1-VAR2)/(VAR3-VAR2)*100,5)
MA1赋值:VAR4的2日简单移动平均
当满足条件VAR4>MA1时,在VAR4和MA1之间画柱状线
如果VAR4>MA1返回VAR4否则返回MA1
BBB赋值:STICKLINE(VAR4>MA1 AND 1日前的VAR4<30,VAR4,MA1,3,1),画红色
当满足条件VAR4<=MA1时,在VAR4和MA1之间画柱状线
DRAWICON(9.9上穿买,VAR4-12,5)
STICKLINE(9.9上穿买,VAR4+5,MA1-4,3,1),画黄色
当满足条件BBB时,在VAR4+5和MA1-4之间画柱状线
STICKLINE(XXX 的5过滤 ,VAR4+5,MA1-4,3,1),画黄色
输出
V20:20,COLOR00FF00
输出
V50:50,COLOR00FF00
输出
V80:80,COLOR00FF00
卖赋值:IF("KDJ.J"(27,3,3)>100,90,100)
DRAWICON(卖上穿99.9,VAR4+12,6)
CCC赋值:VAR4>MA1 AND 1日前的VAR4>70
STICKLINE(卖上穿99.9,VAR4,MA1-9,3,1),画绿色
当满足条件CCC时,在VAR4+5和MA1-4之间画柱状线
STICKLINE(YYY 的5过滤 ,VAR4+5,MA1-4,3,1),画绿色
DRAWTEXT(BBB的5过滤,VAR4-8,'买'),画红色
DRAWTEXT(CCC的5过滤,VAR4+8,'卖'),画绿色