精选通达信主图指标之量价精细(源码分享)
<p data-first-child >通达信主图量价精细(附源码)</p><p >黄金柱:=V/REF(V,1)>=2.0;</p><p >K1:=SUMBARS(黄金柱,1) ;</p><p >K2:=SUMBARS(黄金柱,2);</p><p >K3:=SUMBARS(黄金柱,3);</p><p >K4:=SUMBARS(黄金柱,4);</p><p >K5:=SUMBARS(黄金柱,5);</p><p >K6:=SUMBARS(黄金柱,6);</p><p >K7:=SUMBARS(黄金柱,7);</p><p >K8:=SUMBARS(黄金柱,8);</p><p >K9:=SUMBARS(黄金柱,9);</p><p >K10:=SUMBARS(黄金柱,10);</p><p >AA:STICKLINE(K1,REF(L,K1-1)*1.002,REF(L,K1-1),5,0),COLORYELLOW;</p><p >{预定黄金柱}</p><p >{预定黄金柱:=REF(V,2)>=REF(V,3)*1.99 AND REF(C,2)>REF(O,2)</p><p > AND REF(V,2)=HHV(V,3) AND C/REF(C,2) >=1.0995 AND REF(L,2)=LLV(L,3);}</p><p >{预定:STICKLINE(预定黄金柱,H,H,30,0),COLORRED;}</p><p >{DRAWICON(预定黄金柱,H,19);}</p><p >{将军柱中的五星上将黄金柱}</p><p >T60:=V=HHV(V,60);</p><p >T100:=V=HHV(V,100);</p><p >T2:=V/REF(VOL,1)>=3;</p><p >T3:=REF(C,1)/REF( O,1)<3;</p><p >五星上将:=(T60 AND T2 AND T3) OR (T100 AND T2 AND T3);</p><p >DRAWICON(五星上将,H,23);</p><p >{量柱图}</p><p >C2:=REF(C,1);</p><p >涨停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),1,0);</p><p >STICKLINE(涨停,OPEN,CLOSE,-1,0),COLORWHITE;</p><p >STICKLINE(涨停,H,L,0,0),COLORWHITE;</p><p >DRAWICON(涨停,L-0.2,11);</p><p >DRAWTEXT(涨停,L-0.2,' --涨停');</p><p >跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2),1,0);</p><p >STICKLINE(跌停,OPEN,CLOSE,-1,0),COLORBLUE;</p><p >STICKLINE(跌停,H,L,0,1),COLORBLUE;</p><p >DRAWICON(跌停,H+0.2,2);</p><p >DRAWTEXT(跌停,H+0.2,' --跌停');</p><p >{大阳线:=IF((C-C2)*100/C2>=5,1,0) AND IF((C-C2)*100/C2<(10-0.01*100/C2),1,0) OR IF((C-O)*100/O>=5,1,0) AND IF((C-C2)*100/C2<(10-0.01*100/C2),1,0);</p><p >STICKLINE(大阳线,OPEN,CLOSE,-1,0),COLORRED;</p><p >STICKLINE(大阳线,H,L,0,1),COLORRED;</p><p >大阴线:=IF((C2-C)*100/C2>=5,1,0) AND IF((C2-C)*100/C2<(10-0.01*100/C2),1,0) OR IF((O-C)*100/O>=5,1,0) AND IF((C2-C)*100/C2<(10-0.01*100/C2),1,0);</p><p >STICKLINE(大阴线,OPEN,CLOSE,-1,0),COLORGREEN;</p><p >STICKLINE(大阴线,H,L,0,1),COLORGREEN;}</p><p >{MA13:MA(CLOSE,13),COLORWHITE;</p><p >MA34:MA(CLOSE,34),COLORYELLOW;</p><p >MA55:MA(CLOSE,55),COLOR9933FF;}</p><p >{MA4:MA(CLOSE,4),COLORWHITE;</p><p >MA10:MA(CLOSE,10),COLORYELLOW;</p><p >MA20:MA(CLOSE,20),COLOR9933FF;</p><p >MA30:MA(CLOSE,30),COLORLIBLUE;</p><p >MA60:MA(CLOSE,60),COLORWHITE;</p><p >MA120:MA(CLOSE,120),COLORLIGREEN;}</p><p >TY:=C;</p><p >AA1:=REF(TY,10)=HHV(TY,2*10+1); BB1:=FILTER(AA1,10); C1:=BACKSET(BB1,10+1); HD:=FILTER(C1,10);</p><p >AA2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(AA2,10); CC2:=BACKSET(B2,10+1); LD:=FILTER(CC2,10);</p><p >前期高位:REF(H,BARSLAST(HD)),COLOR00FF00,POINTDOT,LINETHICK3;</p><p >前期低位:REF(L,BARSLAST(LD)),COLORFF00FF,POINTDOT,LINETHICK3;</p><p >{求位置坐标}</p><p >PHD:=IF(LLV(L,3)>=REF(H,3),REF(H,3),</p><p > IF((LLV(L,3)>=REF(C,3) AND REF(C,3)>REF(O,3)),REF(C,3),</p><p > IF(LLV(L,3)>=REF(O,3) AND REF(C,3)>REF(O,3),REF(O,3),REF(L,3))));</p><p >{自动画量能平台}</p><p >{NN 130021}</p><p >{NN:=21;</p><p >TTJ:=BARSLAST(REF(倍量黄金柱,NN-1));</p><p >K0:=TTJ=0;</p><p >K1:=SUMBARS(K0,1);</p><p >K2:=SUMBARS(K0,2);</p><p >K3:=SUMBARS(K0,3);</p><p >K4:=SUMBARS(K0,4);</p><p >K5:=SUMBARS(K0,5);</p><p >K6:=SUMBARS(K0,6);</p><p >K7:=SUMBARS(K0,7);</p><p >K8:=SUMBARS(K0,8);</p><p >K9:=SUMBARS(K0,9);</p><p >K10:=SUMBARS(K0,10);</p><p >CCCC1:=REF(C,K1-1);}</p><p >{在K线图上标示量柱类型}</p><p >倍量:=DRAWICON((VOL>REF(V,1)*2.0 OR VOL=REF(V,1)*2.0) AND C>REF(C,1),H+0.2,26);</p><p >低量:=DRAWICON(VOL<REF(LLV(VOL,13),1),H+0.1,2);</p><p >地量:=DRAWICON(VOL<REF(LLV(VOL,100),1),H+0.1,12);</p><p >平量:=DRAWICON(ABS(VOL-HHV(REF(VOL,1),5))/HHV(REF(VOL,1),5)<=0.03 OR ABS(VOL-REF(VOL,1))/REF(VOL,1)<=0.03,H+0.1,16);</p><p >倍缩:=DRAWICON(VOL<=REF(V,1)*0.5,H+0.1,27);</p><p >{画量柱标识:}</p><p >{1.画倍量黄金柱标识--红箭头图标}</p><p >倍量黄金柱:=DRAWICON((LLV(L,3)>REF(L,3) OR LLV(L,3)=REF(L,3)) AND HHV(V,3)<REF(V,3) AND</p><p >REF(C,3)>REF(O,3) AND REF(V,3)>=2*REF(V,4),H+0.2,1);</p><p >{2.画梯量黄金柱标识--橘子图标}</p><p >梯量黄金柱:=DRAWICON(LLV(L,3)>REF(L,3) AND HHV(V,3)<REF(V,3) AND</p><p >REF(V,5)>REF(V,6) AND REF(V,4)>REF(V,5) AND REF(V,3)>REF(V,4),H,17);</p><p >{3.画平量黄金柱标识--苹果图标}</p><p >平量黄金柱:=DRAWICON(LLV(L,3)>REF(L,3) AND HHV(V,3)<REF(V,3) AND</p><p >REF(C,3)>REF(O,3) AND ABS(REF(V,3)-REF(V,4))/REF(V,4)<=0.03,H,19);</p><p >{4.画立桩量标识--顶部红箭头图标}</p><p >N:=25;</p><p >立桩量:=REF(V,3)/REF(MA(V,5),4)>(N/10) AND</p><p >REF(V,3)/REF(HHV(V,60),4)>1.5 AND LLV(L,3)>REF(L,3);</p><p >STICKLINE(倍量,OPEN,CLOSE,-1,0),COLORYELLOW;</p><p >倍量黄金线:STICKLINE(倍量黄金柱,PHD,PHD,30,0),COLORWHITE;</p><p >DRAWICON(倍量黄金柱,PHD*1.008,12);</p><p >DRAWTEXT(倍量黄金柱,PHD*1.010,' 标准黄金柱精准线'),COLORFF00FF;</p><p >DRAWTEXT(倍量黄金柱,PHD,'================='),COLORWHITE;</p><p >{平量黄金线:STICKLINE(平量黄金柱,PHD*1.002,PHD,100,0),COLORYELLOW;</p><p >DRAWTEXT(平量黄金柱,PHD*1.015,'平量黄金线'),COLORLIGREEN ;</p><p >梯量黄金线:STICKLINE(梯量黄金柱,PHD*1.002,PHD,100,0),COLORYELLOW;</p><p >DRAWTEXT(梯量黄金柱,PHD*1.015,'梯量黄金线'),COLORFF00FF ;}</p><p >立桩量标识:DRAWICON(立桩量,H*1.002,1);</p><p >DRAWTEXT(立桩量,H*1.06,'立'),COLORRED;</p><p >DRAWTEXT(立桩量,H*1.04,'桩'),COLORRED;</p><p >DRAWTEXT(立桩量,H*1.02,'量'),COLORRED;</p><p >{DA:STICKLINE(K4<=30,REF(C,K4-1)*1.002,REF(C,K4-1),10,0),COLORBLUE;</p><p >EA:STICKLINE(K5<=30,REF(C,K5-1)*1.002,REF(C,K5-1),10,0),COLORBLUE;</p><p >FA:STICKLINE(K6<=30,REF(C,K6-1)*1.002,REF(C,K6-1),10,0),COLORBLUE;</p><p >GA:STICKLINE(K7<=30,REF(C,K7-1)*1.002,REF(C,K7-1),10,0),COLORBLUE;</p><p >HA:STICKLINE(K8<=30,REF(C,K8-1)*1.002,REF(C,K8-1),10,0),COLORBLUE;</p><p >IA:STICKLINE(K9<=30,REF(C,K9-1)*1.002,REF(C,K9-1),10,0),COLORBLUE;</p><p >JA:STICKLINE(K10<=30,REF(C,K10-1)*1.002,REF(C,K10-1),10,0),COLORBLUE;</p><p >}</p><p >AAA:=CONST(HHV(H,90));</p><p >TS1:=0+0.03;</p><p >TS2:=TS1+0.03;</p><p >TS3:=TS2+0.03;</p><p >DRAWTEXT(CURRBARSCOUNT=158,AAA-(AAA*TS1),'<一>.量柱的阶段性拐点标志--空间转化原则:'),COLORFF00FF ;</p><p >DRAWTEXT(CURRBARSCOUNT=158,AAA-(AAA*TS2),' 1.平台起柱:在K线整理平台上突然起柱;'),COLORFF00FF ;</p><p >DRAWTEXT(CURRBARSCOUNT=158,AAA-(AAA*TS3),' 2.凹口起柱:在K线逐步回调形成凹口时起柱.常见凹口倍量;'),COLORFF00FF ;</p><p >TS4:=TS3+0.03;</p><p >TS5:=TS4+0.03;</p><p >TS6:=TS5+0.03;</p><p >DRAWTEXT(CURRBARSCOUNT=158,AAA-(AAA*TS4),' 3.过顶起柱:过左峰起柱.常见过顶倍量;'),COLORFF00FF ;</p><p >DRAWTEXT(CURRBARSCOUNT=158,AAA-(AAA*TS5),' 4.触底起柱:触前期谷底起柱.常见触底倍量.'),COLORFF00FF ;</p><p >DRAWTEXT(CURRBARSCOUNT=158,AAA-(AAA*TS6),'<二>.量柱的集合定性--组合量柱:'),COLORFF00FF ;</p><p >TS7:=TS6+0.03;</p><p >TS8:=TS7+0.03;</p><p >TS9:=TS8+0.03;</p><p >DRAWTEXT(CURRBARSCOUNT=158,AAA-(AAA*TS7),' 1.低量柱+倍量柱:后市必大涨!'),COLORFF00FF ;</p><p >DRAWTEXT(CURRBARSCOUNT=158,AAA-(AAA*TS8),' 2.倍量柱+倍量柱:主庄控盘良好,急于拉升!'),COLORFF00FF ;</p><p >DRAWTEXT(CURRBARSCOUNT=158,AAA-(AAA*TS9),' 3.缩倍柱+倍量柱:机会就在眼前!'),COLORFF00FF ;</p><p >{============================}</p><p >BBB:=CONST(HHV(H,190));</p><p >TT1:=0+0.03;</p><p >TT2:=TT1+0.03;</p><p >TT3:=TT2+0.03;</p><p >DRAWTEXT(CURRBARSCOUNT=300,BBB-(BBB*TT1),'<三>.量柱的三日定性--时间转化原则:'),COLORFF00FF ;</p><p >DRAWTEXT(CURRBARSCOUNT=300,BBB-(BBB*TT2),' 1.后三日价升量缩:转化为黄金柱;'),COLORFF00FF ;</p><p >DRAWTEXT(CURRBARSCOUNT=300,BBB-(BBB*TT3),' 2.后三日量柱先阴后阳:该量柱官升一级;'),COLORFF00FF ;</p><p >TT4:=TT3+0.03;</p><p >TT5:=TT4+0.03;</p><p >DRAWTEXT(CURRBARSCOUNT=300,BBB-(BBB*TT4),' 3.后三日量柱阴阳相间:量柱退化,走势面临调整;'),COLORFF00FF ;</p><p >DRAWTEXT(CURRBARSCOUNT=300,BBB-(BBB*TT5),' 4.后三日量柱实体逐步缩小:力量将衰退,面临调整.'),COLORFF00FF ;</p><p >{底部趋势拐点}</p><p >VVOL:=IF(CURRBARSCOUNT=1 AND PERIOD=5,VOL*240/FROMOPEN,DRAWNULL);</p><p >VOLUME:=VOL;</p><p >AAG:=VOL>=REF(V,1)*1.91 AND C>REF(C,1);</p><p >AA1G:=VOL<REF(LLV(VOL,21),1);</p><p >AA2G:=VOL<REF(LLV(VOL,55),1);</p><p >AA3G:=ABS(VOL-REF(VOL,1))/REF(VOL,1)<=0.05;</p><p >MAVOL5:=MA(VOLUME,5);</p><p >MAVOL35:=MA(VOLUME,35);</p><p >MAVOL135:=MA(VOLUME,135);</p><p >VOLUME5:=MA(VOLUME,5);</p><p >VOLUME35:=MA(VOLUME,35);</p><p >VOLUME135:=MA(VOLUME,135);</p><p >买入:=CROSS(VOLUME5,VOLUME135);</p><p >DRAWICON(买入,L,9);</p><p >买入1:=CROSS(VOLUME35,VOLUME135);</p><p >DRAWICON(买入1,L,5);</p><p >买入2:=CROSS(VOLUME5,VOLUME35);</p><p >DRAWICON(买入2,L,1);</p><p >{非常棒}</p><p >EMA13:=EMA(C,13),COLORWHITE;</p><p >EMA21:=EMA(C,21),COLORYELLOW;</p><p >EMA34:=EMA(C,34),COLORFF00FF;</p><p >EMA60:=MA(C,60),COLORFFCC66;</p><p >VAR2:=(2*CLOSE+HIGH+LOW)/4;</p><p >VAR3:=IF(YEAR>=2099 AND MONTH>2,0,1);</p><p >VAR4:=LLV(LOW,5); VAR5:=HHV(HIGH,4);</p><p >散户:=EMA((VAR2-VAR4)/(VAR5-VAR4)*100,4)*VAR3;</p><p >庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR3;</p><p >DRAWTEXT(CROSS(散户,庄家) AND 散户<30,L-0.05,'←低吸'),COLORLIRED;</p><p >DRAWTEXT(CROSS(庄家,散户) AND 散户>70,H+0.05,'←高抛'),COLORGREEN;</p><p >DRAWICON(CROSS(散户,庄家) AND 散户<30,L-0.05,1);</p><p >DRAWICON(CROSS(庄家,散户) AND 散户>70,H+0.05,2);</p><p >VAR9:=CLOSE-REF(CLOSE,5);</p><p >VARA:=EMA(EMA(VAR9,5),5)/EMA(EMA(ABS(VAR9),5),5);</p><p >VARC:=EMA(EMA(VAR9,20),20)/EMA(EMA(ABS(VAR9),20),20);</p><p >卖出:=IF(VARA>0 AND CROSS(VARC,VARA),90,100);</p><p >DRAWICON(卖出<0,H+0.05,2);</p><p >买线:=EMA(CLOSE,2);</p><p >卖线:=EMA(SLOPE(CLOSE,21)*20+CLOSE,42);</p><p >B1:IF(CROSS(买线,卖线),L-0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORMAGENTA;</p><p >S1:IF(CROSS(80,RSI)*30,H+0.02,DRAWNULL),CROSSDOT,LINETHICK3,COLORYELLOW;</p><p >VC:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100+(CLOSE-MA (CLOSE,32))/MA(CLOSE,32)*100)/3;</p><p >S2:=IF(VC>20 AND FILTER(VC< REF(VC,1),5),H+0.02,DRAWNULL),CIRCLEDOT,LINETHICK3,COLORGREEN;</p><p >A0:=(L+H+C*2)/4;</p><p >A1B:EMA(A0,14),COLORBLUE,LINETHICK2;</p><p >A2B:=EMA(A0,25),COLORLIBLUE,LINETHICK2;</p><p >A1X:=(A1B-REF(A1B,1))/REF(A1B,1)*100,NODRAW;</p><p >A2X:=(A2B-REF(A2B,1))/REF(A2B,1)*100,NODRAW;</p><p >看多:IF(A1X>=0 AND BARSLAST(CROSS(A1X,0))>0,REF((C+O)/2,BARSLAST(CROSS(A1X,0))),DRAWNULL),COLORMAGENTA{,LINETHICK2};</p><p >逃顶:IF(A1X<0 AND BARSLAST(CROSS(0,A1X))>0,REF((C+O)/2,BARSLAST(CROSS(0,A1X))),DRAWNULL),COLORCYAN,{LINETHICK2};</p><p >买入持股:IF(A1X>=0,A1B,DRAWNULL)COLORRED,LINETHICK3;</p><p >卖出空仓:IF(A1X<0 AND A2X<0,A1B,DRAWNULL)COLORGREEN,LINETHICK3;</p><p >{STICKLINE(CROSS(A1X,0),H,L,0,0 ),COLOR9933FF;</p><p >STICKLINE(CROSS(A1X,0),C,O,3,0 ),COLOR0000CC;</p><p >STICKLINE(CROSS(A1X,0),C,O,1,0 ),COLOR003FF;</p><p >STICKLINE(CROSS(0,A1X),L,H,0,0 ),COLOR66CC33;</p><figcaption>注:平台目前更新的有关公式源码,手机电脑均可使用,部分提示编码错误的,是为了避免业内叨唠,大家看好有意,可以及时联系我们这边,(会有收费,主99副1)帮忙处理,在线即回!感谢后续多多,关注支持!</figcaption><p></p>
页:
[1]