分享一个非常漂亮的通达信主图公式(炫丽主图)
<p data-first-child >这个是通达信主图,手机我测试通过了,电脑大家需要自己测试</p><p >主图指标源码:</p><p >DRAWGBK(C>0,RGB(0,150,150),RGB(0,00,100),0,' ',0),LINETHICK2;</p><p >M80:MA(C,80),LINETHICK0;</p><p >M200:MA(C,200),LINETHICK0;</p><p >DRAWBAND(M200,RGB(40,100,40),M80,RGB(100,100,0)),LINETHICK0;</p><p >DRAWKLINE(H,O,L,C);</p><p >MA03:MA(C,3),COLORYELLOW,DOTLINE,LINETHICK0;</p><p >IF(MA03>=REF(MA03,1),MA03,DRAWNULL),COLOR0066FF,LINETHICK0;</p><p >IF(MA03< REF(MA03,1),MA03,DRAWNULL),,COLORGREEN,LINETHICK0;</p><p >X:=(3*C+L+O+H)/6;</p><p >多空线:(20*X+19*REF(X,1)+18*REF(X,2)+17*REF(X,3)+16*REF(X,4)+15*REF(X,5)+14*REF(X,6)</p><p >+13*REF(X,7)+12*REF(X,8)+11*REF(X,9)+10*REF(X,10)+9*REF(X,11)+8*REF(X,12)</p><p >+7*REF(X,13)+6*REF(X,14)+5*REF(X,15)+4*REF(X,16)+3*REF(X,17)+2*REF(X,18)+</p><p >REF(X,20))/210,COLORGREEN,LINETHICK2;</p><p >IF(多空线>=REF(多空线,1),多空线,DRAWNULL),COLORRED,LINETHICK3;</p><p >IF(多空线< REF(多空线,1),多空线,DRAWNULL),,COLORGREEN,LINETHICK3;</p><p >牛皮熊:DRAWICON(CROSS(MA03,多空线) AND CLOSE/REF(CLOSE,1)>1.03,LOW*0.96,25);</p><p >DRAWTEXT(FILTER(牛皮熊,8),多空线-0.05,'↖跟庄买进'),COLORGREEN;</p><p >DRAWTEXT(CROSS(MA03,多空线) AND MA03>0,多空线-0.23,'★←'),COLORYELLOW;</p><p >花:=SLOPE(EMA(C,3),3);</p><p >神:=SLOPE(EMA(C,7),7);</p><p >DRAWICON(CROSS(花,神) AND CLOSE/REF(CLOSE,1)>1.03,LOW*0.96,25);</p><p >DRAWTEXT(CROSS(花,神) AND CLOSE/REF(CLOSE,1)>1.03,LOW*0.96,'买'),COLORWHITE;</p><p >花2:=EMA(SLOPE(1,1)+C,3),COLORRED;</p><p >神2:=EMA(SLOPE(1,1)+C,7),COLORBLUE;</p><p >A02:=3*EMA((C-LLV(L,30))/(HHV(H,30)-LLV(L,30))*100,5)-2*EMA((C-LLV(L,30))/(HHV(H,30)-LLV(L,30))*100,5);</p><p >A4:=(HHV(H,34)-C)/(HHV(H,34)-LLV(L,34))*100;</p><p >A5:=EMA(CLOSE,12)-EMA(CLOSE,26);</p><p >A6:=EMA(A5,9);</p><p >A7:=(A5<-0.1 AND A5>A6);</p><p >财神:IF(A7,LLV(L,21),DRAWNULL)COLORRED,CIRCLEDOT;</p><p >DRAWTEXT_FIX(1,0.07,0,0,HYBLOCK)COLOR0080FF;</p><p >DRAWTEXT_FIX(1,0.01,0.08,0,'主题投资:')COLOR0000FF;</p><p >窗口显示:=C>REF(C,1)*1.095 AND C=H;</p><p >T:=BARSLAST(窗口显示),LINETHICK0;</p><p >涨停价:REF(C,T)NODRAW,LINETHICK0;</p><p >涨停日期:REF(DATE-1000000,T)NODRAW,LINETHICK0;</p><p >STICKLINE(L>REF(H,1),L,REF(H,1),20,1001), COLORYELLOW ,LINETHICK0;</p><p >STICKLINE(REF(L,1)>H,REF(L,1),H,20,1001), COLORGREEN ,LINETHICK0;</p><p >TJ01:=C<O AND REFX(C<O,1) AND REFX(C>O,2);</p><p >DRAWLINE(TJ01,REFX(LLV(L,2),1),REF(TJ01,1),REF(REFX(LLV(L,2),1),1),1)COLORYELLOW,LINETHICK0;</p><p >DRAWLINE(TJ01,REFX(HHV(C,2),1),REF(TJ01,1),REF(REFX(HHV(C,2),1),1),1)COLORYELLOW,LINETHICK0;</p><p >MA010:=MA(CLOSE,10),COLORYELLOW,LINETHICK0;</p><p >MA54:=MA(CLOSE,54),COLORFFCCCC,LINETHICK0;</p><p >PL1:=(((CLOSE - MA54) / MA54) < 0.1);</p><p >PL2:=(((CLOSE - MA010) / MA010) < 0.3);</p><p >偏离率:=(((PL1 = 1) AND (PL2 = 1)) * 0.2);</p><p >平台突破:=((((偏离率 = 0) AND (REF(偏离率,1) = 0.2)) AND (REF((COUNT((偏离率 = 0.2),10) = 10),1) = 1)) * 1);</p><p >DRAWTEXT(平台突破,L,'=================='),COLORWHITE;</p><p >DRAWTEXT(平台突破,L-0.05,'平台突破'),COLORGREEN;</p><p >三日最低:=EMA((REF(L,4)+REF(L,3)+REF(L,2))/3,3);</p><p >三日最高:=EMA((REF(H,4)+REF(H,3)+REF(H,2))/3,3);</p><p >EXITLONG:CROSS(CROSS(三日最高,C),0.6);</p><p >ENTERLONG:CROSS(CROSS(C,三日最低),0.5);</p><p >STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORYELLOW;</p><p >涨停:=IF(REF(C,1)*1.095-C<0.01 ,1,0);</p><p >STICKLINE(涨停,OPEN,CLOSE,2.5,0),COLORYELLOW;</p><p >DRAWTEXT(涨停,L-0.1,'涨停'),COLORYELLOW;</p><p >C3:=REF(C,1);</p><p >跌停:=IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0);</p><p >STICKLINE(跌停,OPEN,CLOSE,2.5,0),COLORBLUE;</p><p >DRAWTEXT(跌停,H+0.3,'跌停'),COLORBLUE;</p><p >NN:=120;</p><p >{跳空}</p><p >STICKLINE(REF(L,1)>H,H,REF(L,1),5,0),COLORGRAY;</p><p >STICKLINE(REF(H,1)<L,L,REF(H,1),5,0),COLORGRAY;</p><p >{彩色K线}</p><p >TYX3:=MA(REF(HHV((C+L+O+H)/4,30),1),3);</p><p >TYX4:=MA((C+L+O+H)/4,13);</p><p >TYX5:=EMA((C+L+O+H)/4,21);</p><p >{空心红}</p><p >STICKLINE(C<TYX5 AND C>O,H,L,0,0),COLORRED;</p><p >STICKLINE(C<TYX5 AND C>O,C,O,3,1),COLORRED;</p><p >{深绿}</p><p >STICKLINE(C<TYX5 AND C<O,H,L,0,0),COLOR007700;</p><p >STICKLINE(C<TYX5 AND C<O,C,O,3,0),COLOR005500;</p><p >STICKLINE(C<TYX5 AND C<O,C,O,2,0),COLOR006600;</p><p >STICKLINE(C<TYX5 AND C<O,C,O,1,0),COLOR007700;</p><p >{蓝}</p><p >STICKLINE(C>TYX5 AND C<O,H,L,0,0),COLORFFDD44;</p><p >STICKLINE(C>TYX5 AND C<O,C,O,3,0 ),COLORFF7700;</p><p >STICKLINE(C>TYX5 AND C<O,C,O,2,0 ),COLORFFAA22;</p><p >STICKLINE(C>TYX5 AND C<O,C,O,1 ,0 ),COLORFFDD44;</p><p >{黄}</p><p >STICKLINE(C>TYX5 AND C>O,H,L,0,0 ),COLOR00EEFF;</p><p >STICKLINE(C>TYX5 AND C>O,C,O,3,0 ),COLOR00AAFF;</p><p >STICKLINE(C>TYX5 AND C>O,C,O,2,0 ),COLOR00CCFF;</p><p >STICKLINE(C>TYX5 AND C>O,C,O,1,0 ),COLOR00EEFF;</p><p >{粉红}</p><p >STICKLINE(C>TYX4 AND C>O,H,L,0,0),COLORFF66AA;</p><p >STICKLINE(C>TYX4 AND C>O,C,O,3,0 ),COLORFF11FF;</p><p >STICKLINE(C>TYX4 AND C>O,C,O,2,0 ),COLORFF44FF;</p><p >STICKLINE(C>TYX4 AND C>O,C,O,1,0 ),COLORFF66FF;</p><p >{亮灰}</p><p >STICKLINE(C>TYX4 AND C<O,H,L,0,0),COLOR999999;</p><p >STICKLINE(C>TYX4 AND C<O,C,O,3,0),COLOR555555;</p><p >STICKLINE(C>TYX4 AND C<O,C,O,2,0),COLOR777777;</p><p >STICKLINE(C>TYX4 AND C<O,C,O,1,0),COLOR999999;</p><p >{深红}</p><p >STICKLINE(C>TYX3 AND C>O,H,L,0,0),COLOR0000DD;</p><p >STICKLINE(C>TYX3 AND C>O,C,O,3,0),COLOR000099;</p><p >STICKLINE(C>TYX3 AND C>O,C,O,2,0),COLOR0000BB;</p><p >STICKLINE(C>TYX3 AND C>O,C,O,1,0),COLOR0000DD;</p><p >{涨跌停K线}</p><p >STICKLINE((C-REF(C,1))*100/REF(C,1)>=(10-0.01*100/REF(C,1)),OPEN,CLOSE,1,0),COLORYELLOW;</p><p >STICKLINE((REF(C,1)-C)*100/REF(C,1)>=(10-0.01*100/REF(C,1)),OPEN,CLOSE,1,0),COLORWHITE;</p><p >{突破}</p><p >STICKLINE(REF(COUNT(C<TYX3,5)=5,1) AND C>TYX3 AND C>O,C,O,1,0),COLOR00CCFF;</p><p >STICKLINE(REF(COUNT(C<TYX3,5)=5,1) AND C>TYX3 AND C>O,C,O,1,0),COLOR00CCFF;</p><p >{红绿三角【副图】}</p><p >A10304:=REF(HIGH,3)=HHV(HIGH,2*3+1);</p><p >B10304:=FILTER(A10304,3);</p><p >C10304:=BACKSET(B10304,3+1);</p><p >D10304:=FILTER(C10304,3);{高点}</p><p >A20304:=REF(LOW,3)=LLV(LOW,2*3+1);</p><p >B20304:=FILTER(A20304,3);</p><p >C20304:=BACKSET(B20304,3+1);</p><p >D20304:=FILTER(C20304,3);{低点}</p><p >E10304:=(REF(LLV(LOW,2*3),1)+REF(HHV(HIGH,2*3),1))/2;</p><p >E20304:=(HIGH+LOW)/2;{高低点出现在同一K线上时可作取舍}</p><p >H10304:=(D10304 AND NOT(D20304 AND E10304>=E20304)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;</p><p >L10304:=(D20304 AND NOT(D10304 AND E10304=E20304));</p><p >X10304:=REF(BARSLAST(H10304),1)+1;</p><p >F10304:=BACKSET(H10304 AND COUNT(L10304,X10304)>0,LLVBARS(IF(L10304,LOW,10000),X10304));</p><p >G10304:=F10304>REF(F10304,1);</p><p >I10304:=BACKSET(G10304,2);</p><p >LD0304:=I10304>REF(I10304,1);{过滤后低点}</p><p >L20304:=LD0304 OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;</p><p >X20304:=REF(BARSLAST(L20304),1)+1;</p><p >F20304:=BACKSET(L20304 AND COUNT(H10304,X20304)>0,HHVBARS(IF(H10304,HIGH,0),X20304));</p><p >G20304:=F20304>REF(F20304,1);</p><p >I20304:=BACKSET(G20304,2);</p><p >HD0304:=I20304>REF(I20304,1);{过滤后高点}</p><p >UU0304:=BACKSET(BARSTATUS=2,BARSLAST(LD0304)+1);</p><p >VV0304:=UU0304>REF(UU0304,1);</p><p >UU20304:=BACKSET(BARSTATUS=2,BARSLAST(HD0304)+1);</p><p >VV20304:=UU20304>REF(UU20304,1);</p><p >{以下语句为三角形部分}</p><p >底:REF(L,BARSLAST(VV0304)),COLORYELLOW,LINETHICK0;</p><p >顶:REF(H,BARSLAST(VV20304)),COLORYELLOW,LINETHICK0;</p><p >{下跌三角形:绿色三角形画完介入}</p><p >STICKLINE(VV0304,顶,底,0,0),COLORGREEN,LINETHICK2;</p><p >DRAWLINE(VV20304,H,VV0304,L,0),COLORGREEN,LINETHICK2;{斜}</p><p >DRAWLINE(VV20304,H,VV0304,顶,0),COLORGREEN,LINETHICK2;</p><p >{上涨三角形:红色三角形画完出局}</p><p >STICKLINE(VV20304 ,顶,底,0,0),COLORBLUE,LINETHICK2;</p><p >DRAWLINE(VV0304,L,VV20304,H,0),COLORBLUE,LINETHICK2;{斜}</p><p >DRAWLINE(VV0304,L,VV20304,底,0),COLORBLUE,LINETHICK2;</p><p >DRAWICON(C<O AND C>REF(C,1),H,6);{假阴真阳}</p><p >均价:AMOUNT/VOL/100,NODRAW;</p><p >假阴0:=O>C AND 均价>REF(C,1);</p><p >DRAWTEXT(假阴0,L-0.2,'假阴↖'),COLORE8E8E8;</p><p >STICKLINE(假阴0,O,C,1,0),COLORRED;</p><p >VVOL:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL);{模拟量}</p><p >H_L:=0.1*CONST(HHV(VOL,240));</p><p >长阴短柱:=C/REF(C,1)<=0.96 AND V<HHV(V,30)/1.9;</p><p >DRAWTEXT(长阴短柱 ,V+1.6*0.098,'长阴短柱↙'),COLORLICYAN;</p><p >MA05:=MA(C,5);</p><p >MA5角度: ATAN((MA05/REF(MA05,1)-1)*100)*180/3.1416,NODRAW;</p><p >T01:=CONST(LLVBARS(LOW,10));</p><p >T1HIGH:=CONST(REF(HIGH,T01));</p><p >MM:=CONST(CURRBARSCOUNT);</p><p >T02:=CONST(BARSLAST(CURRBARSCOUNT>MM+T01 AND H>T1HIGH));</p><p >T2HIGH:=CONST(REF(HIGH,T02));</p><p >T03:=CONST(BARSLAST(CURRBARSCOUNT>MM+T02 AND HIGH>T2HIGH));</p><p >T3HIGH:=CONST(REF(HIGH,T03));</p><p >攻击线:DRAWLINE(CURRBARSCOUNT=T03+1, T3HIGH, ISLASTBAR, T3HIGH,1),LINETHICK3,COLOR8080FF;</p><p >DRAWTEXT(ISLASTBAR, T3HIGH, '必杀攻击线')LINETHICK2,COLORCYAN;</p><p class="ztext-empty-paragraph"><br/></p><p >A6A:=REF(HIGH,6)=HHV(HIGH,2*6+1);</p><p >B6A:=FILTER(A6A,6);</p><p >C6A:=BACKSET(B6A,6+1);</p><p >D6A:=FILTER(C6A,6);</p><p >A7A:=REF(LOW,6)=LLV(LOW,2*6+1);</p><p >B7A:=FILTER(A7A,6);</p><p >C7A:=BACKSET(B7A,6+1);</p><p >D7A:=FILTER(C7A,6);</p><p >E6A:=(REF(LLV(LOW,2*6),1)+REF(HHV(HIGH,2*6),1))/2;</p><p >E7A:=(HIGH+LOW)/2;</p><p >H6A:=(D6A AND NOT(D7A AND E6A>=E7A)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;</p><p >H7A:=D6A AND NOT(D7A AND E6A>=E7A);</p><p >L6A:=D7A AND NOT(D6A AND E6A=E7A);</p><p >X6A:=REF(BARSLAST(H6A),1)+1;</p><p >F6A:=BACKSET(H6A AND COUNT(L6A,X6A)>0,LLVBARS(IF(L6A,LOW,10000),X6A));</p><p >G6A:=F6A>REF(F6A,1);</p><p >I6A:=BACKSET(G6A,2);</p><p >LD2A:=I6A>REF(I6A,1);</p><p >L7A:=LD2A OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;</p><p >X7A:=REF(BARSLAST(L7A),1)+1;</p><p >F7A:=BACKSET(L7A AND COUNT(H7A,X7A)>0,HHVBARS(IF(H7A,HIGH,0),X7A));</p><p >G7A:=F7A>REF(F7A,1);</p><p >I7A:=BACKSET(G7A,2);</p><p >HD2A:=I7A>REF(I7A,1);</p><p >UU3A:=BACKSET(BARSTATUS=2,BARSLAST(LD2A)+1);</p><p >VV3A:=UU3A>REF(UU3A,1);</p><p >WW3A:=BACKSET(VV3A,REF(BARSLAST(LD2A),1)+2);</p><p >XX3A:=WW3A>REF(WW3A,1);</p><p >DRAWLINE(XX3A,L,VV3A,L,1),COLORCYAN,LINETHICK2;</p><p >UU4A:=BACKSET(BARSTATUS=2,BARSLAST(HD2A)+1);</p><p >VV4A:=UU4A>REF(UU4A,1);</p><p >WW4A:=BACKSET(VV4A,REF(BARSLAST(HD2A),1)+2);</p><p >XX4A:=WW4A>REF(WW4A,1);</p><p >DRAWLINE(XX4A,H,VV4A,H,1),COLOR8000F0,LINETHICK2;</p><p >HIGHN:=10;LOWN:=10;</p><p >HIGHDISPLAY:=0;</p><p >LOWDISPLAY:=0;</p><p >ZGDISPLAY:=0;</p><p >MADISPLAY:=0;</p><p >AA:=REF(H,HIGHN)=HHV(H,2*HIGHN+1);</p><p >QY:=BACKSET(AA,HIGHN+1);</p><p >CC:=FILTER(QY,HIGHN) AND H=HHV(H,HIGHN+1);</p><p >DRAWICON(CC,H*1.02,2);</p><p >DDD:=BARSLAST(CC);</p><p >GDTS:=IF(CC,BARSCOUNT(C),0);</p><p >DINGBU:=IF(DDD,REF(H,DDD),H);</p><p >DINGBUTS:=IF(DDD,REF(GDTS,DDD),GDTS);</p><p >DINGBU1:=REF(DINGBU,DDD+1);</p><p >GDCS1:=CEILING(DINGBUTS);</p><p >DINGBUTS1:=REF(DINGBUTS,DDD+1);</p><p >GDCS2:=CEILING(DINGBUTS1);</p><p >DINGBU2:=REF(DINGBU1,DDD+1);</p><p ><b>① 指标源码导入即可使用,但由于文章篇幅限制,股票和公式并未分享完整,如果对于指标有兴趣和疑问,亦或者若不能成功导入请点击我头像与我沟通!</b></p><p ><b>②创作收集不易,恳请大家阅读之后,对于我的文章能关注和转发,帮忙加加人气,万分谢谢!</b></p><p></p> 一切尽在不言中,谢谢! 一切尽在不言中,谢谢! 路过,帮顶一下!
页:
[1]