以下是通达信量化开仓法指标公式源码
通达信量化开仓法指标公式源码:
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
MA60:MA(C,60),COLORRED;
MA10:MA(C,10),COLORBLUE;
MA5:MA(C,5),COLORGREEN;
STICKLINE(MA60>=REF(MA60,1),MA60*0.999,MA60,1,0),COLORRED;
STICKLINE(MA60<REF(MA60,1),MA60*0.999,MA60,1,0),COLORGREEN;
STICKLINE(MA10>=REF(MA10,1),MA10*0.999,MA10,1,0),COLORRED;
STICKLINE(MA10<REF(MA10,1),MA10*0.999,MA10,1,0),COLORGREEN;
T1:=BARSLAST(CROSS(DEA,DIFF));
T2:=REF(T1,T1+1)+T1+1;
T3:=BARSLAST(CROSS(DIFF,DEA));
T4:=REF(T3,T3+1)+T3+1;
调整:=T1-T3;
反弹:=T2-T1;
T5:=BARSLAST(CROSS(MA5,MA10));
T6:=BARSLAST(CROSS(MA10,MA5));
T7:=BARSLAST(CROSS(MA10,MA60));
T72:=REF(T7,T7+1)+T7+1;
T8:=BARSLAST(CROSS(MA60,MA10));
T82:=REF(T8,T8+1)+T8+1;
D60:=(MA(C,10)/MA(C,60)-1)*100;
C60:=(C/MA(C,60)-1)*100;
L60:=(L/MA(C,60)-1)*100;
H60:=(H/MA(C,60)-1)*100;
低点:=HHV(H,T82)/LLV(L,T82);
高点:=HHV(H,T72)/LLV(L,T72);
多标:=C*1.02;
多标2:=C*1.01;
空标:=C*0.98;
空标2:=C*0.99;
底背离:=IF(
MACD<=0
ANDL=LLV(L,T2)
ANDLLV(DIFF,T2)<LLV(DIFF,T1+1)
ANDT2-T3>=5
ANDT1>=0
ANDL60<=-0.5,1,0);
DRAWTEXT(FILTER(底背离,3)=1 ,L*0.999,'背离'),COLORRED;
背离金叉:=IF(
COUNT(底背离=1,6)>=1
ANDCROSS(DIFF,DEA)=1,1,0);
DRAWTEXT(背离金叉=1,L*0.999,'开多'),COLORRED;
DRAWNUMBER(背离金叉=1ANDMA10<REF(MA10,1),多标2,多标2),COLORRED;
DRAWNUMBER(背离金叉=1ANDMA10>=REF(MA10,1),多标,多标),COLORRED;
止金叉:=IF(
COUNT(背离金叉=1,T3+1)>=1
ANDCROSS(DEA,DIFF)=1,1,0);
DRAWTEXT(FILTER(止金叉,3)=1,L*0.999,'平多'),COLORGREEN;
顶背离:=IF(
MACD>=0
ANDH=HHV(H,T4)
ANDHHV(DIFF,T4)>HHV(DIFF,T3)
ANDT4-T1>5
ANDT1>5
ANDT3>=0
ANDH60>=0.5,1,0);
DRAWTEXT(FILTER(顶背离,3)=1,H*1.001,'背离'),COLORGREEN;
背离死叉:=IF(
COUNT(顶背离=1,6)>=1
ANDCROSS(DEA,DIFF)=1,1,0);
DRAWTEXT(背离死叉=1,H*1.001,'开空'),COLORGREEN;
止死叉:=IF(
COUNT(背离死叉=1,T1+1)>=1
ANDCROSS(DIFF,DEA)=1,1,0);
DRAWTEXT(FILTER(止死叉,3)=1 ,L*0.999,'平空'),COLORRED;
买点1:=IF(
COUNT(CROSS(MA10,MA60)=1,4)>=1
AND低点>1.02
ANDMA60>=REF(MA60,1)
ANDMA5>=REF(MA5,1)
ANDMA10>=REF(MA10,1)
ANDMA5>=MA10,1,0);
DRAWTEXT(FILTER(买点1,3)=1 ,L*0.999,'开多1'),COLORRED;
DRAWNUMBER(FILTER(买点1,3)=1,多标,多标),COLORRED;
DRAWNUMBER(FILTER(买点1,3)=1,多标2,多标2),COLORRED;
止买1:=IF(
COUNT(买点1=1,T7+1)>=1
ANDCROSS(MA60,MA10)=1,1,0);
DRAWTEXT(FILTER(止买1,3)=1 ,L*0.999,'平多1'),COLORGREEN;
N:=9;
M1:=3;
M2:=3;
M5:=IF(SUM(1,0)>5,MA(C,5),0);
M15:=IF(SUM(1,0)>15,MA(C,15),0);
M30:=IF(SUM(1,0)>30,MA(C,30),0);
M60:=IF(SUM(1,0)>60,MA(C,60),0);
A:=IF(M5>=M15,1,0)+IF(M5>=M30,1,0)+IF(M5>=M60,1,0)+IF(M15>=M30,1,0)+IF(M15>=M60,1,0)+IF(M30>=M60,1,0)+IF(M60>=REF(M60,1),1,0);
区域:A*12.5,LINETHICK2;
DRAWTEXT(A=0,130,'0'),COLORWHITE,LINETHICK2;{3好图标}
DRAWTEXT(A=1,130,'1'),COLORC0C0C0,LINETHICK2;
DRAWTEXT(A=2,130,'2'),COLOR00FFFF,LINETHICK2;
DRAWTEXT(A=3,130,'3'),COLOR00FF00,LINETHICK2;
DRAWTEXT(A=4,130,'4'),COLOR0066FF,LINETHICK2;
DRAWTEXT(A=5,130,'5'),COLORCYAN,LINETHICK2;
DRAWTEXT(A=6,130,'6'),COLORFF00FF,LINETHICK2;
DRAWTEXT(A=7,130,'7'),COLORRED,LINETHICK2;
RSV5:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;
K5:SMA(RSV5,M1,1),COLORYELLOW;
D5:SMA(K5,M2,1),COLOR33FF33;
J5:3*K5-2*D5,COLOR0000FF;
RSV15:=(CLOSE-LLV(LOW,N*3))/(HHV(HIGH,N*3)-LLV(LOW,N*3))*100;
K15:=SMA(RSV15,M1*3,1),COLORFFFFCC;
D15:=SMA(K15,M2*3,1),COLOR33FF33;
J15:=3*K15-2*D15,COLORFF00FF;
RSV30:=(CLOSE-LLV(LOW,N*6))/(HHV(HIGH,N*6)-LLV(LOW,N*6))*100;
K30:=SMA(RSV30,M1*6,1);
D30:=SMA(K30,M2,1);
J30:=3*K30-2*D30,COLOR00FFFF;
底部区域:0,COLOR00FFFF,POINTDOT,LINETHICK3;
通达信量化开仓法指标公式截图
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
评论(0)