通达信【金钻顶底】副图指标 多空涨跌即时提示 用法详解 源码
HGW1:=(2*CLOSE+HIGH+LOW)/4;
HGW2:=LLV(LOW,34);
HGW3:=HHV(HIGH,34);
HGW4:=REF(LOW,1);
HGW5:=SMA(ABS(LOW-HGW4),13,1)/SMA(MAX(LOW-HGW4,0),13,1)*100;
HGW6:=EMA(IF(CLOSE*1.2,HGW5*13,HGW5/13),13);
HGW7:=LLV(LOW,34);
HGW8:=HHV(HGW6,34);
HGW9:=LLV(LOW,10);
HGW10:=HHV(HIGH,25);
HGW11:=EMA((CLOSE-HGW9)/(HGW10-HGW9)*4,4);
HGW12:=HGW11>REF(HGW11,1)AND HGW11<1.5;
HGW13:=MA(CLOSE,3);
HGW16:=IF(LLV(LOW,56),1,0);
HGW17:=EMA(IF(LOW<=HGW7,(HGW6+HGW8*2)/2,0),3)/618*HGW16;
HGW18:=EMA(IF(LOW<=HGW7,(HGW6+HGW8*2)/2,0),3)/618*HGW16*(-1);
空:EMA((HGW1-HGW2)/(HGW3-HGW2)*100,13),COLORYELLOW;
多:EMA(0.667*REF(空,1)+0.333*空,2),COLORF00FF0;
高抛低吸分界线:50,CROSSDOT,COLORYELLOW;
危险小心套牢:IF(CROSS(多,空) AND 多>75,72,68),STICK,LINETHICK4,COLOR00FF00;
NOTEXT1:68,STICK,LINETHICK4,COLOR000000;
卖出:IF(CROSS(空,75) AND 多<空,66,61),STICK,LINETHICK4,COLORF0F000;
NOTEXT2:61,STICK,LINETHICK4,COLOR000000;
弱出强留1:IF(CROSS(空,65) AND 多<空,52,47),STICK,LINETHICK4,COLORRED;
NOTEXT3:47,STICK,LINETHICK4,COLOR000000;
弱出强留:IF(CROSS(空,30) AND 多<空,38,33),STICK,LINETHICK4,COLORYELLOW;
NOTEXT4:33,STICK,LINETHICK4,COLOR000000;
机会:IF(CROSS(空,多) AND 空<22,32,27),STICK,LINETHICK4,COLORF00FF0;
NOTEXT5:27,STICK,LINETHICK4,COLOR000000;
低吸:IF(CROSS(空,多) AND 空<40,25,10),COLORRED,LINETHICK2;
高抛:IF(CROSS(多,空) AND 多>75,75,90),COLORGREEN,LINETHICK2;
STICKLINE(HGW17>REF(HGW17,1),0,HGW17,4,0),COLORFF6600;
STICKLINE(HGW17>REF(HGW17,1),0,HGW17,3,0),COLORFF9900;
STICKLINE(HGW17>REF(HGW17,1),0,HGW17,2,0),COLORFFCC00;
STICKLINE(HGW17>REF(HGW17,1),0,HGW17,1,0),COLORCYAN;
STICKLINE(HGW18>REF(HGW18,1),0,HGW18,4,0),COLOR000099;
STICKLINE(HGW18>REF(HGW18,1),0,HGW18,3,0),COLOR0000CC;
STICKLINE(HGW18>REF(HGW18,1),0,HGW18,2,0),COLOR0000FF;
STICKLINE(HGW18>REF(HGW18,1),0,HGW18,1,0),COLORCC66FF;
DRAWICON(FILTER(CROSS(CLOSE,HGW13) AND HGW12,5),10,26);
来函数检测结果如下:
该公式没有未来函数
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
HGW1赋值:(2*收盘价+最高价+最低价)/4
HGW2赋值:34日内最低价最低值
HGW3赋值:34日内最高价最高值
HGW4赋值:1日前的最低价
HGW5赋值:SMA(最低价-HGW4的绝对值,13,1)/SMA(最低价-HGW4和0较大值,13,1)*100
如果收盘价*1.2返回HGW5*13否则返回HGW5/13
HGW7赋值:34日内最低价最低值
HGW8赋值:34日内HGW6最高值
HGW9赋值:10日内最低价最低值
HGW10:=25日内最高价最高值
HGW11:=EMA((收盘价-HGW9)/(HGW10-HGW9)*4,4)
HGW12:=HGW11>1日前的HGW11AND HGW11<1.5
HGW13:=收盘价的3日简单移动平均
HGW16:=IF(56日内最低价最低值,1,0)
HGW17:=EMA(IF(最低价<=HGW7,(HGW6+HGW8*2)/2,0),3)/618*HGW16
HGW18:=EMA(IF(最低价<=HGW7,(HGW6+HGW8*2)/2,0),3)/618*HGW16*(-1)
输出空:EMA((HGW1-HGW2)/(HGW3-HGW2)*100,13),画黄色
输出多:E0.667*1日前的空+0.333*空的2日简单移动平均,COLORF00FF0
输出高抛低吸分界线:50,CROSSDOT,画黄色
输出危险小心套牢:IF(多上穿空 AND 多>75,72,68),STICK,LINETHICK4,COLOR00FF00
输出NOTEXT1:68,STICK,LINETHICK4,COLOR000000
输出卖出:IF(空上穿75 AND 多<空,66,61),STICK,LINETHICK4,COLORF0F000
输出NOTEXT2:61,STICK,LINETHICK4,COLOR000000
输出弱出强留1:IF(空上穿65 AND 多<空,52,47),STICK,LINETHICK4,画红色
输出NOTEXT3:47,STICK,LINETHICK4,COLOR000000
输出弱出强留:IF(空上穿30 AND 多<空,38,33),STICK,LINETHICK4,画黄色
输出NOTEXT4:33,STICK,LINETHICK4,COLOR000000
输出机会:IF(空上穿多 AND 空<22,32,27),STICK,LINETHICK4,COLORF00FF0
输出NOTEXT5:27,STICK,LINETHICK4,COLOR000000
输出低吸:IF(空上穿多 AND 空<40,25,10),画红色, 线宽为2
输出高抛:IF(多上穿空 AND 多>75,75,90),画绿色, 线宽为2
STICKLINE(HGW17>1日前的HGW17,0,HGW17,4,0),COLORFF6600
STICKLINE(HGW17>1日前的HGW17,0,HGW17,3,0),COLORFF9900
STICKLINE(HGW17>1日前的HGW17,0,HGW17,2,0),COLORFFCC00
STICKLINE(HGW17>1日前的HGW17,0,HGW17,1,0),画青色
STICKLINE(HGW18>1日前的HGW18,0,HGW18,4,0),COLOR000099
STICKLINE(HGW18>1日前的HGW18,0,HGW18,3,0),COLOR0000CC
STICKLINE(HGW18>1日前的HGW18,0,HGW18,2,0),COLOR0000FF
STICKLINE(HGW18>1日前的HGW18,0,HGW18,1,0),COLORCC66FF
DRAWICON(FILTER(收盘价上穿HGW13 AND HGW12,5),10,26)