通達信九轉主圖指標公式原始碼主圖

指标公式分享發表於2024-03-10
{ 通達信九轉主圖指標公式原始碼主圖 }

買線:=EMA(C,1);
賣線:=EMA(SLOPE(C,10)*10+C,20);
STICKLINE(買線>=賣線,REFDATE(HHV(H,0),DATE),REFDATE(LLV(L,0),DATE),6,0),COLOR442233;
STICKLINE(買線<賣線,REFDATE(HHV(H,0),DATE),REFDATE(LLV(L,0),DATE),6,0),COLOR224056;
DRAWKLINE(H,O,L,C);{波段紅青k線}
STICKLINE(買線>=賣線,L,H,0,0),COLOR2F2FFF;
STICKLINE(買線>=賣線,C,O,3.1,0),COLOR000033;
STICKLINE(買線>=賣線,C,O,2.1,0),COLOR000099;
STICKLINE(買線>=賣線,C,O,1.5,0),COLOR0000CC;
STICKLINE(買線>=賣線,C,O,0.3,0),COLOR0000FF;{立體紅顏色};
STICKLINE(買線<賣線,L,H,0,0 ),COLORFFFF00;
STICKLINE(買線<賣線,C,O,3.1,0 ),COLOR000000;
STICKLINE(買線<賣線,C,O,2.1,0 ),COLOR6A6A00;
STICKLINE(買線<賣線,C,O,1.5,0 ),COLORDDDD00;
STICKLINE(買線<賣線,C,O,0.3,0),COLORFFFF00;{立體青色};
ME2:=EMA(CLOSE,6);
五天:=expma(CLOSE,5),COLORRED;
超短線:=EMA(ME2,11),COLORGREEN; LJL07:=(3*C+L+O+H)/6;
牛線:=(20*LJL07+19*REF(LJL07,1)+18*REF(LJL07,2)+17*REF(LJL07,3)+16*REF(LJL07,4)+15*REF(LJL07,5)+14*REF(LJL07,6)+13*REF(LJL07,7)+12*REF(LJL07,8)+11*REF(LJL07,9)+10*REF(LJL07,10)+9*REF(LJL07,11)+8*REF(LJL07,12)+7*REF(LJL07,13)+6*REF(LJL07,14)+5*REF(LJL07,15)+4*REF(LJL07,16)+3*REF(LJL07,17)+2*REF(LJL07,18)+REF(LJL07,20))/210,COLORRED;
熊線:=MA(牛線,5),COLORYELLOW,LINETHICK4,POINTDOT;
持股:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4,COLORWHITE;
{趨勢}
賺了:=IF(EMA(CLOSE,3)>超短線,超短線,DRAWNULL),COLORRED;
持股角度:=ATAN((持股/REF(持股,1)-1)*100)*180/3.1416,COLORRED,NODRAW;
月線:=EMA(持股,30),COLORYELLOW,DOTLINE;
雙月線:=EMA(持股,60),COLORCYAN,DOTLINE;
操作線20日:EMA(C,20),DOTLINE,COLOR0000FF;
紅升:IF(操作線20日>REF(操作線20日,1),操作線20日,DRAWNULL),COLOR0000FF,LINETHICK3;
綠降:IF(操作線20日<ref(操作線20日,1),操作線20日,drawnull),dotline,color0000ff;
趨勢線:EXPMA(C,5),DOTLINE,COLORYELLOW;
KK1:=趨勢線<ref(趨勢線,1);
IF(KK1,趨勢線,DRAWNULL),DOTLINE,COLORYELLOW;
DD1:=趨勢線>REF(趨勢線,1);
IF(DD1,趨勢線,DRAWNULL),COLOR00FFFF,LINETHICK2;
均價:=(3*C+H+L+O)/6;
VAR1:=(8*均價+7*REF(均價,1)+6*REF(均價,2)+5*REF(均價,3)+
4*REF(均價,4)+3*REF(均價,5)+2*REF(均價,6)+REF(均價,8))/36;
VAR2:=(LLV(VAR1,2)+LLV(VAR1,4)+LLV(VAR1,6))/3;
SZ1:=REF(VAR1,1)=REF(VAR2,1) AND VAR1>VAR2 AND CLOSE>VAR1;
SZ2:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>REF(VAR2,1)
AND H/VAR1<1.1 AND L>VAR2 AND CLOSE>VAR1;
SZ3:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>=REF(VAR2,1) AND H/VAR1>1.1;
SZ4:=VAR1>VAR2 AND VAR1>REF(VAR1,1) AND VAR2>REF(VAR2,1)
AND CLOSE>VAR2 AND CLOSE<var1;
SZ5:=(VAR1>VAR2 AND VAR2>REF(VAR2,1) AND VAR1<>REF(VAR1,1)
AND CLOSE<var2) or="" (var1="">VAR2 AND VAR1<ref(var1,1)
AND VAR2<ref(var2,1) and="" close<var2);<br=""> SZ6:=REF(VAR1,1)>REF(VAR2,1) AND VAR1=VAR2 AND CLOSE<var2;
XD1:=VAR1=VAR2 AND CLOSE AND REF(VAR1,1)=REF(VAR2,1) AND CLOSE<var2);
XD2:=VAR1=VAR2 AND CLOSE>VAR1;
SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));
量能飽和度:=IF(SAT>1,1,SAT)*100;
J5:MA(C,5)NODRAW;
J10:MA(C,10)NODRAW;
J30:MA(C,30)NODRAW;
J60:MA(C,60)NODRAW;
J120:MA(C,120)NODRAW;
J250:MA(C,250)NODRAW;
JXDT:=J10>J30 AND J30>J60 AND J60>J250 AND J30>J120;
FGA:=O<ma(c,5) and="" o<ma(c,10)="" c="">MA(C,5) AND C>MA(C,10);
SL:=V<ma(v,40) and="" v<ma(v,135);<br=""> DL:=L=LLV(V,10);
CS1:=JXDT AND COUNT(SL,4)>=1;
CS2:=JXDT AND COUNT(DL,4)>=1;
CS:=CS1 OR CS2;
JS:=CS AND FGA;
DRAWICON(JS,L*0.98,23);
ENTERLONG:DRAWICON(crOSS(買線,賣線),L,42);
EXITLONG:DRAWICON(CROSS(賣線,買線),H,43);
DRAWTEXT_FIX(1,0.0,0.0,0,GNBLOCK)COLORYELLOW;
DRAWTEXT_FIX(1,0.96,0.99,0,HYBLOCK),COLORYELLOW;
MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;
VARR1:=(20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+15*REF(MID,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10)+9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+4*REF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210;
VARR2:=MA(VARR1,17);
A1:=C>REF(C,4);
A2:=BArslASTCOUNT(A1);
A3:=REF(A2,1)=8 AND A2>REF(A2,1);
A4:=REF(BETWEEN(A2,5,8),1) AND A2< REF(A2,1);
A5:=ISLASTBAR AND BETWEEN(A2,1,8);
A6:=(BacKSET(A3>0,9) OR BACKSET(A4>0,A2+1)*0 OR BACKSET(A5>0,A2))*A2;
DRAWTEXT(A6>0,H+H*0.005,VAR2STR(A6,0)),COLOR00FFFF;
DRAWTEXT(A2=9,H+H*0.005,'9'),COLORGREEN;
B1:=C< REF(C,4);
B2:=BARSLASTCOUNT(B1);
B3:=REF(B2,1)=8 AND B2>REF(B2,1);
B4:=REF(BETWEEN(B2,5,8),1) AND B2< REF(B2,1);
B5:=ISLASTBAR AND BETWEEN(B2,1,8);
B6:=(BACKSET(B3>0,9) OR BACKSET(B4>0,B2+1)*0 OR BACKSET(B5>0,B2))*B2;
DRAWTEXT(B6>0,L-L*0.005,VAR2STR(B6,0)),COLORGREEN;
DRAWTEXT(B2=9,L-L*0.005,'9'),COLORRED;

相關文章