通达信指标公式源码日线压力止损止盈支撑位主图指标
<p data-first-child >通达信指标公式源码日线压力止损止盈支撑位主图指标</p><p class="ztext-empty-paragraph"><br/></p><p >CC:=IF(CURRBARSCOUNT<18,CONST(REF(C,1)),DRAWNULL);</p><p >止赢:=1.05*CC,COLOR8000FF;</p><p >止损:=0.97*CC,COLORLIBLUE;</p><p >V1:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20);</p><p >V2:=(1-7/100)*(DMA(CLOSE,V1));</p><p >V3:=(1+7/100)*(DMA(CLOSE,V1));</p><p >V5:=MA((LOW+HIGH+CLOSE)/3,5);</p><p >支撑:=REFDATE(V2,DATE),DOTLINE,LINETHICK1,COLORLIRED;</p><p >阻力:=REFDATE(V3,DATE),DOTLINE,LINETHICK1,COLORGREEN;</p><p >DRAWTEXT(ISLASTBAR,阻力,'阻力'),COLORGREEN;</p><p >DRAWTEXT(ISLASTBAR,支撑,'支撑'),COLORLIRED;</p><p >AAA:=CONST(HHV(H*0.5,90));</p><p >AA:=(REF(CLOSE,1)+REF(CLOSE,2)+OPEN)/3;</p><p >DRAWTEXT_FIX(CURRBARSCOUNT=1,0.86,0.01,1,'今日保护价'),LINETHICK2,COLOR00FFFF;</p><p >DRAWNUMBER_FIX(CURRBARSCOUNT=1,0.90,0.01,1,AA);</p><p >DRAWTEXT_FIX(CURRBARSCOUNT=1,0.92,0.01,1,'元');</p><p >PT:=REF(H,1)-REF(L,1);</p><p >CDP:=(REF(H,1)+REF(L,1)+REF(C,1)*2)/4;</p><p >AH:=CDP+PT;</p><p >AL:=CDP-PT;</p><p >NH:=CDP*2-REF(L,1);</p><p >NL:=CDP*2-REF(H,1);</p><p >强:=IF(AH>REF(C,1)*1.1,REF(C,1)*1.1,AH);</p><p >阻:=IF(NH>强,(强-CDP)*0.618+CDP,NH);</p><p >M:=IF(AL<REF(C,1)/1.1,REF(C,1)/1.1,AL);</p><p >撑:=IF(NL<M,CDP-(CDP-M)*0.618,NL);</p><p >底:=IF(AL<REF(C,1)/1.1,REF(C,1)/1.1,AL);</p><p >今日保护价:=(REF(C,2)+REF(C,1)+O)/3 ;</p><p >顶点:IF(CURRBARSCOUNT<=60, CONST(IF(ISLASTBAR=1,HHV(H, BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORYELLOW,DOTLINE;</p><p >低点:IF(CURRBARSCOUNT<=60, CONST(IF(ISLASTBAR=1,LLV(L, BARSLAST(CURRBARSCOUNT=60)),1)),DRAWNULL),COLORMAGENTA,DOTLINE;</p><p >DRAWTEXT(ISLASTBAR,顶点,'顶点'),COLORYELLOW;</p><p >DRAWTEXT(ISLASTBAR,低点,'底点'),COLORMAGENTA;</p><p >BS:=1;</p><p >MA7:=MA(CLOSE,BS);</p><p >转强:=(6*H+5*REF(H,1)+4*REF(H,2)+3*REF(H,3)+2*REF(H,4)+1*REF(H,5))/(6+5+4+3+2+1);</p><p >转弱:=(6*L+5*REF(L,1)+4*REF(L,2)+3*REF(L,3)+2*REF(L,4)+1*REF(L,5))/(6+5+4+3+2+1);</p><p >BB2:=IF(C>REF(转强,1),1,IF(C<REF(转弱,1),-1,0));</p><p >DD2:=BARSLAST(NOT(BB2=0));</p><p >B:=IF(BB2=0,REF(BB2,DD2),BB2);</p><p >中短:=IF(B=-2,MA(HIGH,6),MA(LOW,6));</p><p >STICKLINE(MA7<中短,LOW,HIGH,0,1),COLORCYAN;</p><p >STICKLINE(MA7>中短,LOW,HIGH,0,1),COLORRED;</p><p >STICKLINE(((OPEN>CLOSE)AND(MA7<中短)),(CLOSE-0.003),OPEN,3.1,0),COLORCYAN;</p><p >STICKLINE(((OPEN<CLOSE)AND(MA7<中短)),CLOSE,OPEN,3.1,1),COLORCYAN;</p><p >STICKLINE(((OPEN>CLOSE)AND(MA7>中短)),OPEN,(CLOSE-0.003),3.1,0),COLORRED;</p><p >STICKLINE(((OPEN<CLOSE)AND(MA7>中短)),OPEN,CLOSE,3.1,1),COLORRED;</p><p >B点:=CROSS(MA7,中短);</p><p >持股:=MA7>中短;</p><p >DRAWICON(CROSS(MA7,中短),L*0.98,7);</p><p >DRAWICON(CROSS(中短,MA7),H*1.02,8);</p><p >{地区板块行业}</p><p >Z1:=STRCAT(HYBLOCK,' ');</p><p >Z2:=STRCAT(Z1,DYBLOCK);</p><p >Z3:=STRCAT(Z2,' ');</p><p >DRAWTEXT_FIX(ISLASTBAR,0.01,0.01,0,STRCAT(Z3,GNBLOCK)),COLORYELLOW;</p><p ><b>本人独创的技术和指标,不会使用或者有需要指标(全套源码)的朋友可以私信找我免费领取!</b></p>
页:
[1]