以下是通达信游资专用抓牛主图指标公式源码
<p data-first-child >N:=5;</p><p >P1:=32;</p><p >P2:=100;</p><p >P3:=20;</p><p >P4:=80;</p><p >K:=0;</p><p >K2:=30;</p><p >K3:=90;</p><p >AAK:=REF(H,N)=HHV(H,2*N+1);</p><p >HAN:=DATE<1301230;</p><p >QY:=BACKSET(AAK,N+1);</p><p >CC:=FILTER(QY,N) AND H=HHV(H,N+1);</p><p >DDD:=BARSLAST(CC),NODRAW;</p><p >GDTS:=IF(CC,CURRBARSCOUNT,0),NODRAW;</p><p >DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS),NODRAW;</p><p >GDCS1:=CONST(DINGBUTS),NODRAW;</p><p >GDCS13:=CONST(REF(HIGH,GDCS1-1));</p><p >DINGBUTS1:=REF(DINGBUTS,DDD+1),NODRAW;</p><p >GDCS2:=CONST(DINGBUTS1);</p><p >GDCS23:=CONST(REF(HIGH,DINGBUTS1-1));</p><p >XG1:=BACKSET(ISLASTBAR,GDCS1);</p><p >XG2:=BACKSET(ISLASTBAR,DINGBUTS1);</p><p >高点压力:=DRAWLINE(CURRBARSCOUNT=GDCS2,H,CURRBARSCOUNT=GDCS1,H,1)*HAN ,COLORBLUE,LINETHICK1;</p><p >AA1:=REF(L,N)=LLV(L,2*N+1);</p><p >QY1:=BACKSET(AA1,N+1);</p><p >CC1:=FILTER(QY1,N) AND L=LLV(L,N+1);</p><p >DD1:=BARSLAST(CC1);</p><p >DDTS:=IF(CC1,CURRBARSCOUNT,0);</p><p >DDTS1:=IF(DD1,REF(DDTS,DD1),DDTS);</p><p >DDCS1:=CONST(DDTS1);</p><p >DDCS13:=CONST(REF(L,DDCS1-1));</p><p >DDTS2:=REF(DDTS1,DD1+1);</p><p >DDCS2:=CONST(DDTS2);</p><p >DDCS23:=CONST(REF(L,DDTS2-1));</p><p >XD1:=BACKSET(ISLASTBAR,DDCS1);</p><p >XD2:=BACKSET(ISLASTBAR,DDTS2);</p><p >低点支撑:=DRAWLINE(CURRBARSCOUNT=DDCS2,L,CURRBARSCOUNT=DDCS1,L,1)*HAN,COLORBLUE,LINETHICK1;</p><p >DRAWBAND(高点压力,RGB(00,00,100),低点支撑,RGB(00,00,00));</p><p >M:=INTPART(3*N/5);</p><p >AAA:=REF(H,M)=HHV(H,2*M+1);</p><p >QYY:=BACKSET(AAA,M+1);</p><p >CCC:=FILTER(QYY,M) AND H=HHV(H,M+1);</p><p >DDDD:=BARSLAST(CCC),NODRAW;</p><p >GDTSS:=IF(CCC,CURRBARSCOUNT,0),NODRAW;</p><p >DINGBUTSS:=IF(DDDD,REF(GDTSS,DDDD),GDTSS),NODRAW;</p><p >GDCS11:=CONST(DINGBUTSS),NODRAW;</p><p >DINGBUTS11:=REF(DINGBUTSS,DDDD+1),NODRAW;</p><p >GDCS22:=CONST(DINGBUTS11);</p><p >压力:DRAWLINE(CURRBARSCOUNT=GDCS22,H,CURRBARSCOUNT=GDCS11,H,1)*HAN,COLORRED,LINETHICK1;</p><p >AA11:=REF(L,M)=LLV(L,2*M+1);</p><p >QY11:=BACKSET(AA11,M+1);</p><p >CC11:=FILTER(QY11,M) AND L=LLV(L,M+1);</p><p >DD11:=BARSLAST(CC11);</p><p >DDTSS:=IF(CC11,CURRBARSCOUNT,0);</p><p >DDTS11:=IF(DD11,REF(DDTSS,DD11),DDTSS);</p><p >DDCS11:=CONST(DDTS11);</p><p >DDTS22:=REF(DDTS11,DD11+1);</p><p >DDCS22:=CONST(DDTS22);</p><p >支撑:DRAWLINE(CURRBARSCOUNT=DDCS22,L,CURRBARSCOUNT=DDCS11,L,1) COLORRED,LINETHICK1;</p><p >STICKLINE(XG2,GDCS23,GDCS23,0.5,1)*HAN,COLORWHITE,LINETHICK3;</p><p >STICKLINE(XG1,GDCS13,GDCS13,0.5,1)*HAN,COLORYELLOW,LINETHICK3;</p><p >STICKLINE(XD2,DDCS23,DDCS23,0.5,1)*HAN,COLORMAGENTA,LINETHICK3;</p><p >STICKLINE(XD1,DDCS13,DDCS13,0.5,1)*HAN,COLORCYAN,LINETHICK3;</p><p >DRAWKLINE(H,O,L,C);</p><p >刀:EMA(CLOSE,5)*HAN,LINETHICK1,COLORYELLOW;</p><p >多:IF(刀>REF(刀,1),刀,DRAWNULL)*HAN,COLORRED,LINETHICK1;</p><p >空:IF(刀<REF(刀,1),刀,DRAWNULL)*HAN,COLORGREEN,LINETHICK1;</p><p >A0:=(L+H+C*2)/4;</p><p >A1:=EMA(A0,14)COLORBLUE,LINETHICK2;</p><p >A1X:=(A1-REF(A1,1))/REF(A1,1)*100,NODRAW;</p><p >看多:IF(A1X>=0 AND BARSLAST(CROSS(A1X,0))>0,REF((C+O)/2,BARSLAST(CROSS(A1X,0)))*HAN,DRAWNULL)</p><p >*HAN,POINTDOT,COLORMAGENTA;</p><p >看空:IF(A1X<0 AND BARSLAST(CROSS(0,A1X))>0,REF((C+O)/2,BARSLAST(CROSS(0,A1X)))*HAN,DRAWNULL)</p><p >*HAN,POINTDOT,COLORLIBLUE;</p><p >VARPP1:=(C+H+O+L)/4;</p><p >看空1:=EMA(CLOSE,15);</p>
页:
[1]