金石抄底通达信指标 副图 源码 测试图
F:=100*(C-REF(C,1))/REF(C,1);
今小昨:=IF(C< REF(O,1) AND F< 0,1,0);
S1:=今小昨;
今小前:=IF(C< REF(O,2) AND F< 0,1,0),LINETHICK0;
S2:=今小前;
A1:=S1=0 AND REF(S1,1)=1 AND S2=0 AND REF(S2,1)=1 AND CROSS(ZIG(3,3) ,REF(ZIG(3 ,3),1));
A2:=S1=0 AND REF(S1,1)=1 AND S2=0 AND REF(S2,1)=1 AND CROSS(ZIG(3,5) ,REF(ZIG(3 ,5),1));
A3:=S1=0 AND REF(S1,1)=1 AND S2=0 AND REF(S2,1)=1 AND CROSS(ZIG(3,10) ,REF(ZIG(3 ,10),1));
STICKLINE(A1=1 AND A2=1 ,0,3,1,0),COLORRED;
STICKLINE(A1=1 AND A2=1 ,0,1,1,0),COLORBLUE;
STICKLINE(A1=1 AND A2=1 AND A3=1,0,5,0.2,0),COLORYELLOW;
STICKLINE(A1=1 AND A2=1 AND A3=1,0,3,1,0),COLORFF00FF;
STICKLINE(A1=1 AND A2=1 AND A3=1,0,1,1,0),COLORBLUE;
DRAWTEXT(A3=1,3.8,'长攻'),COLORRED;
智勇出击: ZIG(3,6)>REF(ZIG(3,6),1)AND REF(ZIG(3,6),1)< REF(ZIG (3,6),2),COLORWHITE,LINETHICK2;
DRAWTEXT(智勇出击=1,1.8,'采'),COLORYELLOW;
小获且退: ZIG(3,10)< REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>REF(ZIG (3,10),2),COLORYELLOW,LINETHICK2;
DRAWTEXT(小获且退=1,2.3,'丢'),COLORWHITE;
VAR3:=PEAKBARS(2,15,1)< 10;
VAR4:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
VAR5:=(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100;
VAR6:=(VAR3+VAR4+VAR5)/3;
VAR7:=EMA(VAR6,5);
指标: EMA(EMA(VAR3,5),5)*3, COLORSTICK;
VAR8:=IF(VAR6<=-20,10,0);
VAR9:=HHV(VAR8,10);
STICKLINE(VAR8=10,20,10,1,0),COLOR6666FF;
VARA:=IF(VAR9 AND CROSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);
DRAWTEXT(VARA=20,15,'底部'),LINETHICK1,COLORWHITE;
STICKLINE((VARA=20),0,10,1,0),COLORWHITE;
VARC:=(ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)) AND (REF(ZIG (3,5),2)<=REF(ZIG(3,5),3));
VARD:=(ZIG(3,5)< REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)>=REF(ZIG(3,5),2)) AND (REF(ZIG (3,5),2)>=REF(ZIG(3,5),3));
STICKLINE((VARC=1),(-4),0,1,0),COLOR0000FF;
DRAWTEXT((VARC=1),(8),'金'),COLORYELLOW;
STICKLINE((VARD=1),4,0,1,0),COLOR00FF00;
DRAWTEXT((VARD=1),10,'石'),COLOR00FF00;
VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VARF:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA ((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR10:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA ((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR11:=VARF< REF(VAR10,1) AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1);
DRAWTEXT(VAR11 AND COUNT(VAR11,30)=1,15,'15短线购入'),LINETHICK1,COLORFF00FF;
STICKLINE(VAR11 AND COUNT(VAR11,30)=1,1,10,1,0),COLORFF00FF;
VAR12:=(HIGH+LOW+CLOSE)/3;
VAR13:=(VAR12-MA(VAR12,14))/(0.015*AVEDEV(VAR12,14));
VAR14:=(VAR12-MA(VAR12,70))/(0.015*AVEDEV(VAR12,70));
VAR15:=IF(VAR13>=150 AND VAR13< 200 AND VAR14>=150 AND VAR14< 200,10,0);
VAR16:=IF(VAR13<=-150 AND VAR13>-200 AND VAR14<=-150 AND VAR14>-200,-10,VAR15);
VAR17:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;
VAR18:=100-ABS(VAR17);
VAR19:=IF(VAR18< 90,VAR18,100);
N:=5;
V1:=MA(HIGH,30)*1.15;
V2:=MA(HIGH,3)*1.03;
V3:=MA(LOW,3)*0.97;
V4:=MA(LOW,30)*0.85;
GET:ZIG(3,N),COLORFFFFFF;
PL5:=ZIG(3,5);
EN1:=ZIG(3,5)>REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)<=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2) <=REF(ZIG(3,5),3);
EX1:=ZIG(3,5)< REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)>=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2) >=REF(ZIG(3,5),3);
PL10:=ZIG(3,10);
EN2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<=REF(ZIG(3,10),2) AND REF(ZIG (3,10),2)<=REF(ZIG(3,10),3);
EX2:=ZIG(3,10)< REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>=REF(ZIG(3,10),2) AND REF(ZIG (3,10),2)>=REF(ZIG(3,10),3);
PL20:=ZIG(3,20);
EN3:=ZIG(3,20)>REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)<=REF(ZIG(3,20),2) AND REF(ZIG (3,20),2)<=REF(ZIG(3,20),3);
EX3:=ZIG(3,20)< REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)>=REF(ZIG(3,20),2) AND REF(ZIG (3,20),2)>=REF(ZIG(3,20),3);
PL40:=ZIG(3,40);
走强1:=BARSLAST(PL5< REF(PL5,1));
走弱1:=BARSLAST(PL5>REF(PL5,1));
走强2:=BARSLAST(PL10< REF(PL10,1));
走弱2:=BARSLAST(PL10>REF(PL10,1));
走强3:=BARSLAST(PL20< REF(PL20,1));
走弱3:=BARSLAST(PL20>REF(PL20,1));
ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);
ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);
DTJZ5:=IF(PL10< REF(PL10,1),COUNT(EN1,走弱2),0);
DTJD5:=IF(PL10< REF(PL10,1),COUNT(EX1,走弱2),0);
ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);
ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);
DTJZ10:=IF(PL20< REF(PL20,1),COUNT(EN2,走弱3),0);
DTJD10:=IF(PL20< REF(PL20,1),COUNT(EX2,走弱3),0);
DRAWTEXT(EN1 AND DTJZ5=1,L*0.98,'㈠下坑短升'),COLORFFFF00;
DRAWTEXT(EX1 AND DTJD5=2,H*1.02,'㈡下坑跌空仓'),COLORFFFF00;
DRAWTEXT(EN2 AND ZTJZ5=1,L*0.98,'㈢谷底小心不急'),COLOR550088;
DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJD5=1,H*1.02,'⑴上坡跌空仓'),COLOR0000FF;
DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2,L*0.98,'⑵上坡升'),COLOR0000FF;
DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJZ5=2,H*1.02,'⑶上坡跌'),COLOR0000FF;
DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=3,L*0.98,'⑷'),COLOR0000FF;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.02,'⑸'),COLOR0000FF;
DRAWTEXT(EN2 AND DTJZ10=1,L*0.94,'Ⅰ上'),COLORFF6000;
DRAWTEXT(EX2 AND DTJD10=2,H*0.96,'Ⅱ下空仓'),COLORFF6000;
DRAWTEXT(EN3 AND ZTJZ10=1,L*1.08,'Ⅲ上坡在即'),COLORFF6000;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.06,'①下跌空仓'),LINETHICK3,COLOR00FFFF;
DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,L*0.94,'②上升'),LINETHICK3,COLOR00FFFF;
DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,H*1.00,'③下坑空仓'),LINETHICK3,COLOR00FFFF;
DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,L*0.94,'④'),LINETHICK3,COLOR00FFFF;
未来函数检测结果如下:
该公式包含未来函数:ZIG
该公式包含未来函数:PEAK
该公式包含未来函数:PEAKBARS
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
F赋值:100*(C-1日前的C)/1日前的C
今小昨赋值:IF(C< 1日前的O AND F< 0,1,0)
S1赋值:今小昨
今小前赋值:IF(C< 2日前的O AND F< 0,1,0),LINETHICK0
S2赋值:今小前
A1赋值:S1=0 AND 1日前的S1=1 AND S2=0 AND 1日前的S2=1 AND CROSS(ZIG(3,3) ,REF(ZIG(3 ,3),1))
A2赋值:S1=0 AND 1日前的S1=1 AND S2=0 AND 1日前的S2=1 AND CROSS(ZIG(3,5) ,REF(ZIG(3 ,5),1))
A3赋值:S1=0 AND 1日前的S1=1 AND S2=0 AND 1日前的S2=1 AND CROSS(ZIG(3,10) ,REF(ZIG(3 ,10),1))
当满足条件A1=1 AND A2=1 时,在0和3之间画柱状线
当满足条件A1=1 AND A2=1 时,在0和1之间画柱状线
当满足条件A1=1 AND A2=1 AND A3=1时,在0和5之间画柱状线
当满足条件A1=1 AND A2=1 AND A3=1时,在0和3之间画柱状线
当满足条件A1=1 AND A2=1 AND A3=1时,在0和1之间画柱状线
当满足条件A3=1时,在3.8和'长攻'位置书写文字
输出智勇出击: ZIG(3,6)>REF(ZIG(3,6),1)AND REF(ZIG(3,6),1)< REF(ZIG (3,6),2),画白色,LINETHICK2
当满足条件智勇出击=1时,在1.8和'采'位置书写文字
输出小获且退: ZIG(3,10)< REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>REF(ZIG (3,10),2),画黄色,LINETHICK2
当满足条件小获且退=1时,在2.3和'丢'位置书写文字
VAR3赋值:PEAKBARS(2,15,1)< 10
VAR4赋值:(收盘价-收盘价的24日简单移动平均)/收盘价的24日简单移动平均*100
VAR5赋值:(收盘价-收盘价的32日简单移动平均)/收盘价的32日简单移动平均*100
VAR6赋值:(VAR3+VAR4+VAR5)/3
VAR7赋值:VAR6的5日指数移动平均
输出指标: VAR3的5日指数移动平均,5)*3, COLORSTICK
如果VAR6<=-20返回10否则返回0
VAR9赋值:10日内VAR8最高值
当满足条件VAR8=10时,在20和10之间画柱状线
VARA赋值:IF(VAR9 AND CROSS(收盘价的3日简单移动平均,收盘价的5日简单移动平均),20,0)
当满足条件VARA=20时,在15和'底部'位置书写文字
STICKLINE((VARA=20),0,10,1,0),画白色
VARC赋值:(ZIG(3,5)>REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)<=REF(ZIG(3,5),2)) AND (REF(ZIG (3,5),2)<=REF(ZIG(3,5),3))
VARD赋值:(ZIG(3,5)< REF(ZIG(3,5),1)) AND (REF(ZIG(3,5),1)>=REF(ZIG(3,5),2)) AND (REF(ZIG (3,5),2)>=REF(ZIG(3,5),3))
STICKLINE((VARC=1),(-4),0,1,0),COLOR0000FF
DRAWTEXT((VARC=1),(8),'金'),画黄色
STICKLINE((VARD=1),4,0,1,0),COLOR00FF00
DRAWTEXT((VARD=1),10,'石'),COLOR00FF00
VARE赋值:MA(100*(收盘价-34日内收盘价最低值)/(34日内最高价最高值-34日内最低价最低值),5)-20
VARF赋值:100-3*SMA((收盘价-75日内最低价最低值)/(75日内最高价最高值-75日内最低价最低值)*100,20,1)+2*SMA(SMA ((收盘价-75日内最低价最低值)/(75日内最高价最高值-75日内最低价最低值)*100,20,1),15,1)
VAR10赋值:100-3*SMA((OPEN-75日内最低价最低值)/(75日内最高价最高值-75日内最低价最低值)*100,20,1)+2*SMA(SMA ((OPEN-75日内最低价最低值)/(75日内最高价最高值-75日内最低价最低值)*100,20,1),15,1)
VAR11赋值:VARF< 1日前的VAR10 AND 成交量>1日前的成交量 AND 收盘价>1日前的收盘价
DRAWTEXT(VAR11 AND 统计30日满足VAR11的天数=1,15,'15短线购入'),LINETHICK1,COLORFF00FF
STICKLINE(VAR11 AND 统计30日满足VAR11的天数=1,1,10,1,0),COLORFF00FF
VAR12赋值:(最高价+最低价+收盘价)/3
VAR13赋值:(VAR12-VAR12的14日简单移动平均)/(0.015*AVEDEV(VAR12,14))
VAR14赋值:(VAR12-VAR12的70日简单移动平均)/(0.015*AVEDEV(VAR12,70))
如果VAR13>=150 AND VAR13< 200 AND VAR14>=150 AND VAR14< 200返回10否则返回0
如果VAR13<=-150 AND VAR13>-200 AND VAR14<=-150 AND VAR14>-200返回-10否则返回VAR15
VAR17赋值:(收盘价-收盘价的13日简单移动平均)/收盘价的13日简单移动平均*100
VAR18赋值:100-VAR17的绝对值
如果VAR18< 90返回VAR18否则返回100
N赋值:5
V1赋值:最高价的30日简单移动平均*1.15
V2赋值:最高价的3日简单移动平均*1.03
V3赋值:最低价的3日简单移动平均*0.97
V4赋值:最低价的30日简单移动平均*0.85
输出GET:ZIG(3,N),COLORFFFFFF
PL5赋值:ZIG(3,5)
EN1:=ZIG(3,5)>REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)<=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2) <=REF(ZIG(3,5),3)
EX1赋值:ZIG(3,5)< REF(ZIG(3,5),1) AND REF(ZIG(3,5),1)>=REF(ZIG(3,5),2) AND REF(ZIG(3,5),2) >=REF(ZIG(3,5),3)
PL10赋值:ZIG(3,10)
EN2:=ZIG(3,10)>REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)<=REF(ZIG(3,10),2) AND REF(ZIG (3,10),2)<=REF(ZIG(3,10),3)
EX2赋值:ZIG(3,10)< REF(ZIG(3,10),1) AND REF(ZIG(3,10),1)>=REF(ZIG(3,10),2) AND REF(ZIG (3,10),2)>=REF(ZIG(3,10),3)
PL20赋值:ZIG(3,20)
EN3:=ZIG(3,20)>REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)<=REF(ZIG(3,20),2) AND REF(ZIG (3,20),2)<=REF(ZIG(3,20),3)
EX3赋值:ZIG(3,20)< REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)>=REF(ZIG(3,20),2) AND REF(ZIG (3,20),2)>=REF(ZIG(3,20),3)
PL40赋值:ZIG(3,40)
走强1赋值:上次PL5< 1日前的PL5距今天数
走弱1赋值:上次PL5>1日前的PL5距今天数
走强2赋值:上次PL10< 1日前的PL10距今天数
走弱2赋值:上次PL10>1日前的PL10距今天数
走强3赋值:上次PL20< 1日前的PL20距今天数
走弱3赋值:上次PL20>1日前的PL20距今天数
ZTJZ5赋值:IF(PL10>1日前的PL10,统计走强2日满足EN1的天数,0)
ZTJD5赋值:IF(PL10>1日前的PL10,统计走强2日满足EX1的天数,0)
DTJZ5赋值:IF(PL10< 1日前的PL10,统计走弱2日满足EN1的天数,0)
DTJD5赋值:IF(PL10< 1日前的PL10,统计走弱2日满足EX1的天数,0)
ZTJZ10赋值:IF(PL20>1日前的PL20,统计走强3日满足EN2的天数,0)
ZTJD10赋值:IF(PL20>1日前的PL20,统计走强3日满足EX2的天数,0)
DTJZ10赋值:IF(PL20< 1日前的PL20,统计走弱3日满足EN2的天数,0)
DTJD10赋值:IF(PL20< 1日前的PL20,统计走弱3日满足EX2的天数,0)
当满足条件EN1 AND DTJZ5=1时,在L*0.98和'㈠下坑短升'位置书写文字
当满足条件EX1 AND DTJD5=2时,在H*1.02和'㈡下坑跌空仓'位置书写文字
当满足条件EN2 AND ZTJZ5=1时,在L*0.98和'㈢谷底小心不急'位置书写文字
DRAWTEXT(EX1 AND PL10>1日前的PL10 AND ZTJD5=1,H*1.02,'⑴上坡跌空仓'),COLOR0000FF
DRAWTEXT(EN1 AND PL10>1日前的PL10 AND ZTJZ5=2,L*0.98,'⑵上坡升'),COLOR0000FF
DRAWTEXT(EX1 AND PL10>1日前的PL10 AND ZTJZ5=2,H*1.02,'⑶上坡跌'),COLOR0000FF
DRAWTEXT(EN1 AND PL10>1日前的PL10 AND ZTJZ5=3,L*0.98,'⑷'),COLOR0000FF
DRAWTEXT(EX2 AND PL20>1日前的PL20 AND ZTJD10=1,H*1.02,'⑸'),COLOR0000FF
当满足条件EN2 AND DTJZ10=1时,在L*0.94和'Ⅰ上'位置书写文字
当满足条件EX2 AND DTJD10=2时,在H*0.96和'Ⅱ下空仓'位置书写文字
当满足条件EN3 AND ZTJZ10=1时,在L*1.08和'Ⅲ上坡在即'位置书写文字
DRAWTEXT(EX2 AND PL20>1日前的PL20 AND ZTJD10=1,H*1.06,'①下跌空仓'),LINETHICK3,COLOR00FFFF
DRAWTEXT(EN2 AND PL20>1日前的PL20 AND ZTJZ10=2,L*0.94,'②上升'),LINETHICK3,COLOR00FFFF
DRAWTEXT(EX2 AND PL20>1日前的PL20 AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,H*1.00,'③下坑空仓'),LINETHICK3,COLOR00FFFF
DRAWTEXT(EN2 AND PL20>1日前的PL20 AND ZTJZ10=3,L*0.94,'④'),LINETHICK3,COLOR00FFFF