黄金法则通达信指标公式源码
通达信整合黄金分割主图指标公式
通达信整合黄金分割主图指标公式高点:=22;低点:=10;T1:=10;T:=180;M5:=MA(C,5);M10:=MA(C,10);M20:=MA(C,20);M60:=MA(C,60);AX:=M5>=M60 AND M10>=M60 AND M20>=M60;TX:=BARSLAST(CROSS(AX,0.5));HT:=HHVBARS(H,TX+1);LT0:=FINDLOWBARS(L,0,30,1);HT0:=FINDHIGHBARS(H,LT0=0,60,1);LLX:=REF(L,LT0);HHX:=REF(H,HT0);NOTEXT01:DRAWLINE(HT0=0,HHX,LT0=0,HHX,1),COLORYE LLOW,NODRAW;NOTEXT02:DRAWLINE(HT0=0,HHX,LT0=0,LLX,1),COLORYEL LOW;NOTEXT03:DRAWLINE(HT0=0,HHX,LT0=0,(HHX-LLX)*0.382+LLX,1){,DOTLINE},COLORLIMAGENTA;NOTEXT04:DRAWLINE(HT0=0,HHX,LT0=0,(HHX-LLX)*0.618+LLX,1){,DOTLINE},COLORLIBLUE;TA:=BARSLAST(REF(NOTEXT01,1)=DRAWNULL AND HT=0);X支撑线:REF(L,LT0),COLORYELLOW,NODRAW;X阻力1:(HHX-LLX)*0.382+LLX,COLORLIMAGENTA,NODRAW;X阻力2:(HHX-LLX)*0.618+LLX,COLORLIBLUE, NODRAW;{黄金分割}HH:=REF(HHV(H,T),T1);LL:=REF(LLV(L,T),T1);H1:=HH-(HH-LL)*0.191;H2:=HH-(HH-LL)*0.382;H3:=HH-(HH-LL)*0.5;H4:=HH-(HH-LL)*0.618;H5:=HH-(HH-LL)*0.764;H6:=HH-(HH-LL)*0.809;H7:=HH-(HH-LL)*0.236;顶1:=HH+(HH-LL)*0.191;顶2:=HH+(HH-LL)*0.382;顶3:=HH+(HH-LL)*0.618;底1:=IF((HH-LL)<LL,LL-(HH-LL)*0.191,LL-LL*0.191);底2:=IF((HH-LL)<LL,LL-(HH-LL)*0.382,LL-LL*0.382);底3:=IF((HH-LL)<LL,LL-(HH-LL)*0.618,LL-LL*0.618);高:=IF(CURRBARSCOUNT<=T+T1 AND CURRBARSCOUNT>T1,REFDATE(HH,DATE),DRAWNULL);一:=IF(CURRBARSCOUNT<=T+T1,REFDATE(H1,DATE),DRAW NULL);二:=IF(CURRBARSCOUNT<=T+T1,REFDATE(H2,DATE),DRAW NULL);三:=IF(CURRBARSCOUNT<=T+T1,REFDATE(H3,DATE),DRAW NULL);四:=IF(CURRBARSCOUNT<=T+T1,REFDATE(H4,DATE),DRAW NULL);五:=IF(CURRBARSCOUNT<=T+T1,REFDATE(H5,DATE),DRAW NULL);六:=IF(CURRBARSCOUNT<=T+T1,REFDATE(H6,DATE),DRAW NULL);七:=IF(CURRBARSCOUNT<=T+T1,REFDATE(H7,DATE),DRAWNULL);低:=IF(CURRBARSCOUNT<=T+T1 AND CURRBARSCOUNT>T1,REFDATE(LL,DATE),DRAWNULL);NOTEXT1:高,COLOR007799;{NOTEXT2:IF(GOQI,DRAWNULL,一),DOTLINE,COLOR777777;NOTEXT3:IF(GOQI,DRAWNULL,二),DOTLINE,COLOR777777;NOTEXT4:IF(GOQI,DRAWNULL,三),DOTLINE,COLOR777777;NOTEXT5:IF(GOQI,DRAWNULL,四),DOTLINE,COLOR777777;NOTEXT6:IF(GOQI,DRAWNULL,五),DOTLINE,COLOR777777;NOTEXT7:IF(GOQI,DRAWNULL,六),DOTLINE,COLOR777777;} AA:REFDATE(一,DATE),DOTLINE,COLOR555555;BB:REFDATE(二,DATE),DOTLINE,COLOR005858;CCA:REFDATE(三,DATE),DOTLINE,COLOR777777;DDA:REFDATE(四,DATE),DOTLINE,COLOR005858;EE:REFDATE(五,DATE),DOTLINE,COLOR555555;FF:REFDATE(六,DATE),DOTLINE,COLOR555555;GG:REFDATE(七,DATE),DOTLINE,COLOR555555;NOTEXT8:低,COLOR668800;TT:=INTPART(T*0.5)+T1;TT1:=(CURRBARSCOUNT=TT);TT2:=(CURRBARSCOUNT=TT-32);TT3:=(CURRBARSCOUNT=TT-40);DRAWTEXT(TT1 AND 高,高-(高-低)*0.025,STRCAT(' 【高点】: ',CON2STR(HH,2))),COLOR007799;DRAWTEXT(TT1 AND 一,一+(高-低)*0.020,STRCAT('191 (809): ',CON2STR(H1,2))),COLOR888888;DRAWTEXT(TT1 AND 二,二+(高-低)*0.020,STRCAT('382 (618): ',CON2STR(H2,2))),COLOR008888;DRAWTEXT(TT1 AND 三,三+(高-低)*0.020,STRCAT(' 【中点】: ',CON2STR(H3,2))),COLOR000088;DRAWTEXT(TT1 AND 四,四+(高-低)*0.020,STRCAT('618 (382): ',CON2STR(H4,2))),COLOR008888;DRAWTEXT(TT1 AND 五,五+(高-低)*0.020,STRCAT('764 (236): ',CON2STR(H5,2))),COLOR888888;DRAWTEXT(TT1 AND 六,六+(高-低)*0.020,STRCAT('809 (191): ',CON2STR(H6,2))),COLOR888888;DRAWTEXT(TT1 AND 七,七+(高-低)*0.020,STRCAT('236 (764): ',CON2STR(H7,2))),COLOR888888;DRAWTEXT(TT1 AND 低,低+(高-低)*0.020,STRCAT(' 【低点】: ',CON2STR(LL,2))),COLOR668800;DRAWTEXT(TT3 AND 高,高+(高-低)*0.040,''),COLOR007799;{顶距};GD:=CONST(FINDHIGH(H,0,高点*10,1));DD:=CONST(FINDLOW(L,0,低点*10,1));GT:=CONST(BARSLAST(GD=H))+1;DT:=CONST(BARSLAST(DD=L))+1;SH:=CONST(IF(GT=1,H,REF(H,GT-1)));SL:=CONST(IF(DT=1,L,REF(L,DT-1)));CC:=IF(DT>GT,DT,GT);CD:=INTPART(CC-(DT+GT)/2);CG:=IF(高点>CD,DT,GT);{CG:=IF(高点>CD,CD/2,高点);}{黄金分割}ZG:=IF(CURRBARSCOUNT<=CD,SH,DRAWNULL);DRAWBAND(ZG,RGB(0,0,0),ZG,RGB(0,0,0)),DOTLINE,COLORL IRED;ZD:=IF(CURRBARSCOUNT<=CD,SL,DRAWNULL);DRAWBAND(ZD,RGB(0,0,0),ZD,RGB(0,0,0)),DOTLINE,COLORL IRED;X191:=IF(CURRBARSCOUNT<=CD,SH-(SH-SL)*0.191,DRAWNULL);DRAWBAND(X191,RGB(0,0,0),X191,RGB(0,0,0)),DOTLINE,CO LORLIRED;X382:=IF(CURRBARSCOUNT<=CD,SH-(SH-SL)*0.382,DRAWNULL);DRAWBAND(X382,RGB(0,0,0),X382,RGB(0,0,0)),DOTLINE,CO LORLIRED;X500:=IF(CURRBARSCOUNT<=CD,SH-(SH-SL)*0.500,DRAWNULL);DRAWBAND(X500,RGB(0,0,0),X500,RGB(0,0,0)),DOTLINE,CO LORRED;X618:=IF(CURRBARSCOUNT<=CD,SH-(SH-SL)*0.618,DRAWNULL);DRAWBAND(X618,RGB(0,0,0),X618,RGB(0,0,0)),DOTLINE,CO LORLIRED;X809:=IF(CURRBARSCOUNT<=CD,SH-(SH-SL)*0.809,DRAWNULL);DRAWBAND(X809,RGB(0,0,0),X809,RGB(0,0,0)),DOTLINE,CO LORLIRED;DRAWTEXT(CURRBARSCOUNT=CG,(ZD)*1.02,STRCAT('起点: ',CON2STR(ZD,2))),COLORLIGRAY;DRAWTEXT(CURRBARSCOUNT=CG,(X191)*0.986,STRCAT('8 0.9% ',CON2STR(X191,2))),COLORLIGRAY;DRAWTEXT(CURRBARSCOUNT=CG,(X382)*0.985,STRCAT('6 1.8% ',CON2STR(X382,2))),COLORLIGRAY;DRAWTEXT(CURRBARSCOUNT=CG,(X500)*0.984,STRCAT('5 0% ',CON2STR(X500,2))),COLORLIGRAY;DRAWTEXT(CURRBARSCOUNT=CG,(X618)*0.982,STRCAT('3 8.2% ',CON2STR(X618,2))),COLORLIGRAY;DRAWTEXT(CURRBARSCOUNT=CG,(X809)*0.98,STRCAT('19.1% ',CON2STR(X809,2))),COLORLIGRAY;DRAWTEXT(CURRBARSCOUNT=CG,(ZG)*0.98,STRCAT('100% ',CON2STR(ZG,2))),COLORLIGRAY;。
黄金阶梯源码通达信指标公式源码
DRAWGBK(C>0, RGB(0,0,50),RGB(00,0,0),0,0,1);DRAWKLINE(H,O,L,C);买线:=EMA(C,3);卖线:=EMA(SLOPE(C,25)*18+C,55);BU:=CROSS(买线,卖线);SEL:=CROSS(卖线,买线);ISDOWN:=IF(CLOSE<OPEN,1,0);ISUP:=IF(CLOSE>OPEN,1,0);STICKLINE(买线<卖线AND ISDOWN,HIGH,OPEN,0,0),COLORCYAN;STICKLINE(买线<卖线AND ISDOWN,CLOSE,OPEN,3,0),COLORCYAN;STICKLINE(买线<卖线AND ISDOWN,CLOSE,LOW,0,0),COLORCYAN;STICKLINE(买线>=卖线AND ISUP,HIGH,CLOSE,0,1),COLORRED;STICKLINE(买线>=卖线AND ISUP,CLOSE,OPEN,3,1),COLORRED;STICKLINE(买线>=卖线AND ISUP,OPEN,LOW,0,1),COLORRED;STICKLINE(买线>=卖线AND ISDOWN,CLOSE,LOW,0,0),COLORRED;STICKLINE(买线>=卖线AND ISDOWN,HIGH,OPEN,0,0),COLORRED;STICKLINE(买线>=卖线AND ISDOWN,CLOSE,OPEN,3,1),COLORRED,LINETHICK2; STICKLINE(买线>=卖线AND ISDOWN,CLOSE*1.0018,OPEN*0.9988,1.8,0),COLORCYAN; STICKLINE(买线<卖线AND ISUP,HIGH,CLOSE,0,1),COLORCYAN;STICKLINE(买线<卖线AND ISUP,CLOSE,OPEN,3,1),COLORCYAN;STICKLINE(买线<卖线AND ISUP,OPEN,LOW,0,1),COLORCYAN;{MA1:MA(CLOSE,5);MA2:MA(CLOSE,13),LINETHICK2;MA3:MA(CLOSE,21);MA4:MA(CLOSE,62),LINETHICK2;MA120:MA(CLOSE,120);MA6:MA(CLOSE,250);}DRAWBMP(BU=1,L,'B');DRAWBMP(SEL=1,HIGH*1.038,'S');{===================================================== =}范围高A:=REFDATE(HHV(H,120),DATE)*1.05;范围低A:=REFDATE(LLV(L,120),DATE)*0.95;MA5:=MA(C,5),COLORCYAN,LINETHICK2;MA24:=MA(C,24),COLORGREEN,LINETHICK2;MA72:=MA(C,72),COLORRED,LINETHICK2;MA200:=IF((MA(C,200)<=范围高A AND MA(C,200)>=范围低A) ORC>=MA(C,200),MA(C,200),DRAWNULL),COLORBLUE,LINETHICK2;{=======================仪表盘=========================} 主升浪:=ISLASTBAR AND MA5>MA24 AND MA24>MA72 ANDMA72>IF(MA200=DRAWNULL,0,MA200);主浪回调:=ISLASTBAR AND MA24>MA5 AND MA5>MA72 ANDMA72>IF(MA200=DRAWNULL,0,MA200);主浪深调:=ISLASTBAR AND MA24>MA72 AND MA72>MA5 ANDMA5>IF(MA200=DRAWNULL,0,MA200);初升浪:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MAX(MA24,MA72) AND MA5>MA24 AND MA24>MA72;底部反弹:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MA72 ANDMA72>MA24 AND MA5>MA24;探底阶段:=ISLASTBAR AND IF(MA200=DRAWNULL,300,MA200)>MA72 ANDMA72>MA24 AND MA24>MA5;观望:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24>MA72 AND C<MA72,MA72>MA200 AND C<MA200);有牛:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24<MA72 ANDC>=MA72,MA72<MA200 AND C>=MA200);放弃:=ISLASTBAR AND IF(MA200=DRAWNULL,MA24<MA72 AND C<MA72,MA72<MA200 AND C<MA200);DRAWGBK(显示仪表盘1=1 AND 主升浪=0 AND 主浪回调=0 AND 主浪深调=0 AND 初升浪=0 AND 底部反弹=0 AND 探底阶段=0 AND 观望=0 AND 有牛=0 AND 放弃=0,0,0,0,'观望',0)COLOR00BF00;DRAWGBK(显示仪表盘1=1 AND 主升浪,0,0,0,'主升浪',0)COLORFF00FF;DRAWGBK(显示仪表盘1=1 AND 主浪回调,0,0,0,'主浪回调',0)COLORFF8080; DRAWGBK(显示仪表盘1=1 AND 主浪深调,0,0,0,'主浪深调',0)COLOR009500; DRAWGBK(显示仪表盘1=1 AND 初升浪,0,0,0,'初升浪',0)COLOR00FFFF; DRAWGBK(显示仪表盘1=1 AND 底部反弹,0,0,0,'底部反弹',0)COLORFFFF00; DRAWGBK(显示仪表盘1=1 AND 探底阶段,0,0,0,'探底阶段',0);DRAWGBK(显示仪表盘1=1 AND 观望,0,0,0,'观望',0)COLORFFFF00;DRAWGBK(显示仪表盘1=1 AND 有牛,0,0,0,'有牛',0)COLOR00FFFF;DRAWGBK(显示仪表盘1=1 AND 放弃,0,0,0,'放弃',0)COLOR00BF00;高1:=REF(HHV(H,120),3);低1:=REF(LLV(L,120),3);H1:=高1-(高1-低1)*0.191;H2:=高1-(高1-低1)*0.382;H3:=高1-(高1-低1)*0.5;H4:=高1-(高1-低1)*0.618;H5:=高1-(高1-低1)*0.809;突破:=REF(EMA(C,55),1);A1X:=(EMA(C,10)-突破)/突破*100;基准:=IF(A1X>=0,REF(EMA(C,10),BARSLAST(CROSS(A1X,0))+1),REF(EMA(C,10),BARSLAS T(CROSS(0,A1X))+1));STICKLINE(A1X>=0,基准,突破,5,0),COLOR000099;STICKLINE(A1X<0,基准,突破,5,0),COLOR00CC66;AA:=CROSS(A1X,0),LINETHICK0;STICKLINE(A1X>=0,C,O,2.7,0),COLOR0011FF;STICKLINE(A1X>=0,C,O,1.8,0),COLOR0044FF;STICKLINE(A1X>=0,C,O,0.9,0),COLOR0077FF;STICKLINE(A1X>=0,C,O,0.1,0),COLOR0099FF;STICKLINE(A1X>=0,H,L,0,0),COLOR0099FF;STICKLINE(AA,C,O,2.7,0),COLOR330033;STICKLINE(AA,C,O,1.8,0),COLOR770077;STICKLINE(AA,C,O,0.9,0),COLORBB00BB;STICKLINE(AA,C,O,0.1,0),COLORFF00FF;STICKLINE(AA,H,L,0,0),COLORFF00FF;{DRAWICON(AA,C*0.92,9);}DRAWTEXT(AA,C*0.98,'买'),COLORRED;BB:=CROSS(0,A1X),LINETHICK0;STICKLINE(A1X<0,C,O,2.7,0),COLORAAAAAA;STICKLINE(A1X<0,C,O,1.8,0),COLORCCCCCC; STICKLINE(A1X<0,C,O,0.9,0),COLORDDDDDD; STICKLINE(A1X<0,C,O,0.1,0),COLORFFFFFF; STICKLINE(A1X<0,H,L,0,0),COLORFFFFFF; STICKLINE(BB,C,O,2.7,0),COLOR333300; STICKLINE(BB,C,O,1.8,0),COLOR555500; STICKLINE(BB,C,O,0.9,0),COLOR777700; STICKLINE(BB,C,O,0.1,0),COLOR999900; STICKLINE(BB,H,L,0,0),COLOR999900;{ DRAWICON(BB,C*1.05,15);} DRAWTEXT(BB,C*1.01,'卖'),COLOR00FF00;。
通达信黄金柱主图公式源码
通达信黄金柱主图公式源码M1:=5;M2:=10;M3:=20;M4:=30;M5:=60;M6:=120;M7:=240;MA5攻击线:EMA(CLOSE,5),LINETHICK1,COLORFFFFFF;MA10操盘线:EMA(CLOSE,10),LINETHICK2,COLOR00FFFF;MA20月线:EMA(CLOSE,20),LINETHICK2,COLORFF00FF;MA30生命线:EMA(CLOSE,M4),LINETHICK2,COLORFF6600;MA60决策线:EMA(CLOSE,M5),LINETHICK1,COLOR009933;MA120趋势线:EMA(CLOSE,M6),COLOR006699,LINETHICK1;MA240年线:EMA(CLOSE,M7),COLOR002299,LINETHICK1;MA5:=MA(CLOSE,5);MA10:=MA(CLOSE,10);MA30:=MA(CLOSE,30);MA60:=MA(CLOSE,60);AA11:=BARSLAST(MA60>MA30 AND (MA30=MA10 OR MA30>MA10));BB11:=REF(COUNT(C<MA60,AA11)=AA11,1);CC11:=CROSS(C,MA60) AND VOL>MA(VOL,5) AND (C-REF(C,1))/REF(C,1)*100>3;芙蓉出水:=BB11 AND CC11;DRAWTEXT(芙蓉出水,H,'芙蓉出水'),COLORFF00FF;STICKLINE(芙蓉出水,H,L,0.1,0),COLORFF00FF;STICKLINE(芙蓉出水,O,C,1.1,1),LINETHICK1,COLORFF00FF;ZJ:=AMOUNT/10000;TM:=V-MA(V,10);一穿三:=MA5>O AND MA10>O AND MA30>O AND MA5<C AND MA10<C AND MA30<C AND CLOSE>OPEN ;DRAWTEXT(一穿三,L,'◆一穿三'),COLORFFFFFF;STICKLINE(一穿三,OPEN,CLOSE,5,0),COLORCC0066;三日不破:=MIN(MIN(L,REF(L,1)),REF(L,2))>=REF(L,3);三日量缩:=(MAX(MAX(V,REF(V,1)),REF(V,2))<REF(V,3));三日价涨A:=C>=REF(C,1);三日价涨B:=C<REF(C,1);三日价涨C:=MIN(MIN(C,REF(C,1)),REF(C,2))>=REF(L,3);TIM:=IF(DATE<1140214,1,0);缩倍柱:=(VOL*1.95<=REF(VOL,1))*TIM;百日低量:=(VOL=LLV(VOL,100))*TIM;倍量柱:=C>REF(C,1)*1.04 AND (VOL>=1.9*REF(VOL,1))*TIM;四日前倍量柱:=(REF(VOL,3)>1.9*REF(VOL,4))*TIM;四日前高量柱:=(REF(VOL,3)>=REF(VOL,4) AND REF(VOL,3)<1.9*REF(VOL,4) AND 三日量缩)*TIM;前三引用不成立:=COUNT(REF(四日前倍量柱,1) AND (REF(三日不破,1) OR REF(三日价涨C,1)),3)=0 AND COUNT(REF(四日前高量柱,1) AND(REF(三日不破,1) OR REF(三日价涨C,1)),3)=0;倍量黄金柱:=四日前倍量柱 AND 三日量缩 AND 三日不破 AND 三日价涨A AND 前三引用不成立;高量黄金柱:=四日前高量柱 AND 三日量缩 AND 三日不破 AND 三日价涨A AND 前三引用不成立;黄金柱:=倍量黄金柱 OR 高量黄金柱;次倍量黄金柱:=NOT(黄金柱) AND 四日前倍量柱 AND 三日量缩AND 三日不破 AND 三日价涨B AND 前三引用不成立;次高量黄金柱:=NOT(黄金柱) AND 四日前高量柱 AND 三日量缩AND 三日不破 AND 三日价涨B AND 前三引用不成立;次黄金柱:=次倍量黄金柱 OR 次高量黄金柱;准倍量黄金柱:=NOT(黄金柱OR 次黄金柱) AND 四日前倍量柱AND ((三日量缩 AND 三日价涨C) OR (COUNT(倍量柱,3)>=1 AND 三日不破))AND 前三引用不成立;准高量黄金柱:=NOT(黄金柱OR 次黄金柱) AND 四日前高量柱AND (三日量缩 AND 三日价涨C) AND 前三引用不成立;准黄金柱:=准倍量黄金柱 OR 准高量黄金柱;倍量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱) AND 四日前倍量柱 AND 三日不破 AND 三日价涨A AND 前三引用不成立;高量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱) AND 四日前高量柱 AND 三日不破 AND 三日价涨A AND 前三引用不成立;将军柱:=倍量将军柱 OR 高量将军柱;次倍量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱) AND 四日前倍量柱 AND 三日不破 AND 三日价涨B AND 前三引用不成立;次高量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱) AND 四日前高量柱 AND 三日不破 AND 三日价涨B AND 前三引用不成立;次将军柱:=次倍量将军柱 OR 次高量将军柱;准倍量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱 OR 次将军柱) AND 四日前倍量柱 AND 三日价涨C AND 前三引用不成立;准高量将军柱:=NOT(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱 OR 次将军柱) AND 四日前高量柱 AND 三日价涨C AND 前三引用不成立;准将军柱:=准倍量将军柱 OR 准高量将军柱;BACKSET100:=BACKSET(黄金柱 OR 次黄金柱 OR 准黄金柱 OR 将军柱 OR 次将军柱 OR 准将军柱,4);FILTER100:=FILTER(BACKSET100,3);BACKSET101:=BACKSET(黄金柱,4);FILTER101:=FILTER(BACKSET101,3);BACKSET102:=BACKSET(次黄金柱,4);FILTER102:=FILTER(BACKSET102,3);BACKSET103:=BACKSET(准黄金柱,4);FILTER103:=FILTER(BACKSET103,3);BACKSET104:=BACKSET(将军柱,4);FILTER104:=FILTER(BACKSET104,3);BACKSET105:=BACKSET(次将军柱,4);FILTER105:=FILTER(BACKSET105,3);BACKSET106:=BACKSET(准将军柱,4);FILTER106:=FILTER(BACKSET106,3);立桩量:=VOL=HHV(VOL,40) AND VOL>1.9*REF(VOL,1);立桩量三日突破:=IF(BARSLAST(立桩量)=1 AND CLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量)=2 AND CLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量)=3 AND CLOSE>REF(HIGH,3),1,0)));立桩量三日不破:=BARSLAST(立桩量)=3 AND REF(LOW,3)<=MIN(MIN(C,REF(C,1)),REF(C,2));BACKSET300:=BACKSET(立桩量三日不破,4);BACKSET301:=BACKSET(立桩量三日突破,4);立桩量成立:=FILTER(BACKSET300,3) AND BACKSET301 AND 立桩量;{重绘K线}DRAWKLINE(H,O,L,C);{重绘K线显示大阳\大阴\涨停\跌停\假阴,适用于通达信}RC1:=REF(C,1);涨停率10:=10-1/RC1;{178448-WEN98编写}涨停率5:=5-1/RC1;比前涨率:=(C-RC1)*100/RC1;比前跌率:=(RC1-C)*100/RC1;ST:=NAMELIKE('ST') OR NAMELIKE('*ST');涨停:= IF(ST, (比前涨率>=涨停率5), (比前涨率>=涨停率10));本日涨率:=(C-O)*100/O;本日跌率:=(O-C)*100/O;STICKLINE((H-RC1)*100/RC1>=涨停率10,H,MAX(C,O),1,0),COLORYELLOW;{涨停后回落}STICKLINE((RC1-L)*100/RC1>=涨停率10,L,MIN(C,O),1,0),COLORBLUE;{跌停后回升}跌停:= IF(NAMELIKE('ST'), (比前跌率>=涨停率5), (比前跌率>=涨停率10));STICKLINE(跌停,O,C,1,0),COLORLIBLUE;大阳线:=C>O AND (比前涨率>=涨停率5 OR 本日涨率>=涨停率5)AND 比前涨率<涨停率10 AND 涨停=0;STICKLINE(大阳线,O,C,0.5,0),COLORFF99FF;大阴线:=C<O AND (比前跌率>=涨停率5 OR 本日跌率>=涨停率5)AND 比前跌率<涨停率10 AND 跌停=0;STICKLINE(大阴线,O,C,1,0),COLOR009933;{假阴柱}假阴:=C<O AND C>REF(C,1);STICKLINE(假阴,O,C,1,0),COLORRED;{假阳柱}假阳:=C>O AND C<REF(C,1);STICKLINE(假阳,O,C,1,0),COLORGREEN;{涨停}AAAA:=CLOSE/REF(C,1)>=1.09;STICKLINE(AAAA,O,C,1,0),COLORYELLOW;STICKLINE(AAAA,L,H,1,0),COLORYELLOW;{跌停}STICKLINE(CLOSE<REF(CLOSE,1)*0.9015 AND CLOSE=LOW,CLOSE,OPEN,1,0),COLORBLUE;DRAWTEXT(立桩量成立,HIGH,'←立柱'),COLORGREEN;DRAWTEXT(FILTER101,LOW,'↖黄金柱'),COLORYELLOW;STICKLINE(FILTER101,OPEN,CLOSE,0.5,0),COLORYELLOW;DRAWTEXT(FILTER104,LOW,'↖将军柱'),COLORRED;STICKLINE(FILTER104,OPEN,CLOSE,0.1,1),COLORYELLOW;{设立参数:百分比(2,20,5), 右数峰序(2,20,2)}{ZIG(3,5);}百分比:=5;右数峰序:=2;波谷值: CONST(TROUGH(2,百分比,1)),NODRAW;波谷距离:= 1+CONST(TROUGHBARS(2,百分比,1)),NODRAW;波峰值:= CONST(PEAK(1,百分比,右数峰序));允许误差:=0.024;XG:= ABS(波峰值-波谷值)<=允许误差{AND BARSCOUNT(V)>60};波峰距离:= 1+CONST(PEAKBARS(1,百分比,右数峰序)),NODRAW;距离:=CURRBARSCOUNT;DRAWLINE(距离=波峰距离AND XG,波谷值,距离=1,波谷值,-1),COLORFF0099;DRAWTEXT(距离=波谷距离AND XG,L,' ↖精准峰谷线'),COLORFF0099;DRAWICON(距离=波峰距离,H,2);{波峰位置}DRAWICON(距离=波谷距离,L,1);{波谷位置}精准点:=(ABS(H-波谷值)<=允许误差OR ABS(L-波谷值)<=0.024) {AND 距离<=120};STICKLINE(精准点,波谷值,波谷值,40,-1),COLORFF6600;{画精准谷底线}波谷值2:= CONST(TROUGH(2,百分比,2));波谷值3:= CONST(TROUGH(2,百分比,3));波谷值4:= CONST(TROUGH(2,百分比,4));波谷距离2:= 1+CONST(TROUGHBARS(2,百分比,2));波谷距离3:= 1+CONST(TROUGHBARS(2,百分比,3));波谷距离4:= 1+CONST(TROUGHBARS(2,百分比,4));XG2:= ABS(波谷值-波谷值2)<=允许误差;XG3:= ABS(波谷值-波谷值3)<=允许误差;XG4:= ABS(波谷值-波谷值4)<=允许误差;XGL:=(距离=波谷距离2 AND XG2) OR (距离=波谷距离3 AND XG3)OR (距离=波谷距离4 AND XG4);DRAWLINE(XGL,波谷值,距离=1,波谷值,-1),COLORFFFF33;DRAWTEXT(XGL,L,' -------↖精准谷底线'),COLORFFFF33;{精准线WEN98的}N110:=3;L0:=0.00;{点位差参数}{底精准线}L1:=ABS(L-REF(L,1))<=L0;L2:=ABS(L-REF(L,2))<=L0;L3:=ABS(L-REF(L,3))<=L0;L4:=ABS(L-REF(L,4))<=L0;L5:=ABS(L-REF(L,5))<=L0;精准线首次:=L1 OR L2 OR L3 OR L4 OR L5;精准左:=FILTER(精准线首次,N110) ;天数:=BARSLAST(精准左);LTS:=REF(L,天数);精准右:=ABS(L-LTS)<=L0;STICKLINE(精准左,L,L,30,-1),COLORMAGENTA;{顶精准线}G1:=ABS(H-REF(H,1))<=L0;G2:=ABS(H-REF(H,2))<=L0;G3:=ABS(H-REF(H,3))<=L0;G4:=ABS(H-REF(H,4))<=L0;G5:=ABS(H-REF(H,5))<=L0;精准线首次1:=G1 OR G2 OR G3 OR G4 OR G5;精准左1:=FILTER(精准线首次1,N110) ;天数1:=BARSLAST(精准左1);HTS:=REF(H,天数1);精准右1:=ABS(H-HTS)<=L0;STICKLINE(精准左1,H,H,30,-1),COLOR00FF00;{必杀线}N:=10;T1:=CONST(LLVBARS(LOW,N));T1HIGH:=CONST(REF(HIGH,T1));CC:=CONST(CURRBARSCOUNT);T2:=CONST(BARSLAST((CURRBARSCOUNT >(CC+T1)) AND (HIGH>T1HIGH)));T2HIGH:=CONST(REF(HIGH,T2));T3:=CONST(BARSLAST((CURRBARSCOUNT >(CC+T2)) AND (HIGH>T2HIGH)));T3HIGH:=CONST(REF(HIGH,T3));必杀线:DRAWLINE(CURRBARSCOUNT=T3+1, T3HIGH, ISLASTBAR, T3HIGH, 1),LINETHICK5,COLOR0000FF;杀线:DRAWLINE(CURRBARSCOUNT=T3+1, T3HIGH, ISLASTBAR, T3HIGH, 1),LINETHICK1,COLOR00FFFF;DRAWTEXT(ISLASTBAR, T3HIGH, ' 必杀线')LINETHICK1,COLOR002299;。
通达信指标公式源码黄金分割线
基本还是按黄金分割去理解!<有未来>小心用!N2:=5;A1:=REF(H,N2)=HHV(H,2*N2+1);B1:=FILTER(A1,N2);C1:=BACKSET(B1,N2+1);HD:= FILTER(C1,N2);RH:=BACKSET(CURRBARSCOUNT=2,BARSLAST(HD)+1);SH:=RH>REF(RH,1);H1:=REF(H ,BARSLAST(SH));STICKLINE(H1,H1,H1,5,0),LINETHICK2,COLOR00FFFF;DRAWTEXT(ISLASTBAR,H1*1.005,'近期高点'),COLORFFFF00;TTP:=(CURRBARSCOUNT=5-4);DRAWNUMBER(TTP AND H1,H1,H1),COLORFFFF00;A2:=REF(L,N2)=LLV(L,2*N2+1);B2:=FILTER(A2,N2);C2:=BACKSET(B2,N2+1);LD:=FILTER(C2,N2);RL:=BACKSET(CURRBARSCOUNT=2,BARSLAST(LD)+1);SL:=RL>REF(RL,1);L1:=REF(L ,BARSLAST(SL));STICKLINE(L1,L1,L1,5,0),COLORFFFF00,LINETHICK5;DRAWTEXT(ISLASTBAR,L1*1.005,'近期低点'),COLORFFFF00;DRAWNUMBER(TTP AND L1,L1,L1),COLOR00FFFF;VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VARA:=REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VARB:=REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VARC:=REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); STICKLINE(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 ORVAR8 OR VAR9 OR VARA OR VARB OR VARC,CLOSE,REF(CLOSE,1),3,1),COLORRED;{红1}VARD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2);{} VARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2); VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2); STICKLINE(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 ORVAR18,CLOSE,REF(CLOSE,1),3,0),COLORFFCC66;VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1;STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),4,1),COLORYELLOW;VAR1A:=REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,1) AND VARD;STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),4,2),COLOR00FF00{98FD}; STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR00C8FF;STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLOR10ECFF;STICKLINE(VAR19,REF(CLOSE,1),REF(CLOSE,2),2,0),COLORRED;{黄托底} STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLOR00D900;STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),3,0),COLORBLUE;{蓝压顶} STICKLINE(VAR1A,REF(CLOSE,1),REF(CLOSE,2),0,0),COLOR090FF2;FG:IF (HIGH>PEAK(1,7,1),HHV(HIGH,21),PEAK(1,7,1)),COLORGREEN;FD:IF (LOW<TROUGH(2,7,1),LLV(LOW,21),TROUGH(2,7,1)),COLORRED;分割0.191:(FG-FD)*0.191+FD,DOTLINE,COLORMAGENTA;分割0.382:(FG-FD)*0.382+FD,DOTLINE,COLORCYAN;分割0.5:(FG-FD)*0.5+FD,DOTLINE,COLORGREEN;分割0.618:(FG-FD)*0.618+FD,DOTLINE,COLORCYAN;分割0.809:(FG-FD)*0.809+FD,DOTLINE,COLORYELLOW;DRAWTEXT(ISLASTBAR>0 ,ABS(分割0.191),'F0.191')COLORMAGENTA; DRAWTEXT(ISLASTBAR>0 ,ABS(分割0.382),'F0.382')COLORCYAN;DRAWTEXT(ISLASTBAR>0 ,ABS(分割0.5),'F0.500')COLORGREEN;DRAWTEXT(ISLASTBAR>0 ,ABS(分割0.618),'F0.618')COLORCYAN;DRAWTEXT(ISLASTBAR>0 ,ABS(分割0.809),'F0.809')COLORYELLOW;。
黄金波动主图指标通达信指标公式源码
STICKLINE(启爆,C,O,3,1),COLORWHITE;
STICKLINE(启爆,C,O,1,0),COLORGREEN;
STICKLINE(C>=O ,HIGH,LOW,0,1 ),COLORRED;
STICKLINE(C>=O ,OPEN,CLOSE,3.1,0 ),COLOR000033;
DRAWTEXT(CURRBARSCOUNT=N/4+5,GD-KJ*0.09,'【风险区】--高抛避险'),COLORFFFFFF;
DRAWTEXT(CURRBARSCOUNT=N/4+5,GD-KJ*0.3,'【警示区】--逢高减仓'),COLORFFFFFF;
DRAWTEXT(CURRBARSCOUNT=N/4+5,GD-KJ*0.45,'【突破区】--主力拉升'),COLORFFFFFF;
STICKLINE(CLOSE<O ,OPEN,CLOSE,0.3,0 ),COLORCYAN;
CC:IF(CURRBARSCOUNT<18,CONST(REF(C,1)),DRAWNULL),COLOR000000,NODRAW;
止赢:1.05*CC,COLORMAGENTA,LINETHICK1;
DRAWTEXT(CURRBARSCOUNT=N/4+5,GD-KJ*0.55,'【拉升区】--强势畜锐'),COLORFFFFFF;
DRAWTEXT(CURRBARSCOUNT=N/4+5,DD+KJ/3,'【关注区】--逢低买入'),COLORFFFFFF;
通达信黄金线主图指标公式
通达信黄金线主图指标公式RC1:=REF(C,1);大阴线:=C<0.96*O OR C<=RC1*0.96 OR C>1000 AND C<=RC1*0.98;大阴T:=BARSLAST(FILTER(大阴线,3));{调整显示密度}大阴实顶: REF(O,大阴T),COLORLIGREEN,POINTDOT;{显示大阴K线的开盘价O};大阴二一: REF((L+H)/2,大阴T),NODRAW;DRAWTEXT_FIX(ISLASTBAR,0,0,0,HYBLOCK);{在屏幕左上角显示所属行业板块}DRAWTEXT_FIX(ISLASTBAR,0.05,0,0,DYBLOCK);{在屏幕左上角显示所属地域板块}DRAWTEXT_FIX(ISLASTBAR,0.1,0,0,GNBLOCK);{在屏幕左上角显示所属概念板块};AA:=(C-REF(C,1))/REF(C,1)*100;ZS:=(NAMELIKE('ST') OR NAMELIKE('*ST') OR NAMELIKE('S')) AND AA>=4.945;DS:=(NAMELIKE('ST') OR NAMELIKE('*ST') OR NAMELIKE('S')) AND AA<=-4.945;涨停价:IF(ZS,REF(C,1)*1.05,REF(C,1)*1.1),NODRAW;跌停价:IF(DS,REF(C,1)*0.95,REF(C,1)*0.9),NODRAW;比系数:=1.3;金线:=1;临界点:=0;MA5:=MA(C,5);MA10:=MA(C,10);MA20:=MA(C,20);均线:=MA5>REF(MA5,1) AND MA10<REF(MA10,1) AND MA20<REF(MA20,1);RV1:=REF(V,1);RV2:=REF(V,2);RV3:=REF(V,3);RC2:=REF(C,2);RC3:=REF(C,3);RC4:=REF(C,4);RO1:=REF(O,1);RO2:=REF(O,2);RO3:=REF(O,3);RO4:=REF(O,4);不破价顶:=C>=RC3 AND RC1>=RC3 AND RC2>=RC3;不破价底:=L>RO3 AND REF(L,1)>RO3 AND REF(L,2)>RO3;均价:=AMOUNT/VOL/100;RJ1:=REF(均价,1);RJ2:=REF(均价,2);阳柱:=C>=O OR (C<O AND 均价>RC1);三日二阳:=COUNT(阳柱,3)>=2;基价柱阳:=RC3>RO3;价渐升:=(均价>=RJ1 OR C>RC1) AND (RJ1>=RJ2 OR RC1>=RC2);均价升:=(C+RC1+RC2)/3>RC3;量渐升:=V>RV1 AND RV1>RV2 ;量渐减:=V<=RV1 AND RV1<=RV2 ;均量减:=(V+RV1+RV2)/3<=RV3 AND NOT(量渐升);日价量比:=C/V;日价量比升:=日价量比>=REF(日价量比,1) AND REF(日价量比,1)>=REF(日价量比,2);均价升幅:=(C+RC1+RC2)/3/RC3;均量升幅:=(V+RV1+RV2)/3/RV3;价量比:=比系数*均价升幅/均量升幅>1;基前跳空:=RO3>RC4 AND RC4>RO4;黄金柱1T:=基价柱阳 AND 价渐升 AND 量渐减 AND 不破价顶AND 不破价底 AND 基前跳空;BACKSET101T:=BACKSET(黄金柱1T,5);FILTER101T:=FILTER(BACKSET101T,4);黄金柱1:=基价柱阳AND 价渐升AND 量渐减AND 不破价顶AND 不破价底 ;BACKSET101:=BACKSET(黄金柱1,4);FILTER101:=FILTER(BACKSET101,3);黄金柱11:=黄金柱1 AND REF(黄金柱1,1);BACKSET1011:=BACKSET(黄金柱11,4);FILTER1011:=FILTER(BACKSET1011,3);黄金柱12:=黄金柱1 AND REF(黄金柱1,2);BACKSET1012:=BACKSET(黄金柱12,4);FILTER1012:=FILTER(BACKSET1012,3);黄金柱13:=黄金柱1 AND REF(黄金柱1,3);BACKSET1013:=BACKSET(黄金柱13,4);FILTER1013:=FILTER(BACKSET1013,3);黄金柱2T:=基价柱阳 AND 价渐升 AND 均量减 AND NOT(量渐升) AND 不破价顶 AND 不破价底 AND 基前跳空 AND NOT(黄金柱1) AND NOT(黄金柱1T);BACKSET201T:=BACKSET(黄金柱2T,5);FILTER201T:=FILTER(BACKSET201T,4);黄金柱2:=基价柱阳 AND 价渐升 AND 均量减 AND NOT(量渐升) AND 不破价顶 AND 不破价底 AND NOT(黄金柱1) AND NOT(黄金柱1T);BACKSET201:=BACKSET(黄金柱2,4);FILTER201:=FILTER(BACKSET201,3);黄金柱21:=黄金柱2 AND REF(黄金柱2,1);BACKSET2011:=BACKSET(黄金柱21,4);FILTER2011:=FILTER(BACKSET2011,3);黄金柱22:=黄金柱2 AND REF(黄金柱2,2);BACKSET2012:=BACKSET(黄金柱22,4);FILTER2012:=FILTER(BACKSET2012,3);黄金柱23:=黄金柱2 AND REF(黄金柱2,3);BACKSET2013:=BACKSET(黄金柱23,4);FILTER2013:=FILTER(BACKSET2013,3);黄金柱3T:=基价柱阳 AND 均价升 AND 量渐减 AND 不破价顶AND 不破价底 AND 基前跳空 AND NOT(黄金柱1) AND NOT(黄金柱2) AND NOT(黄金柱1T) AND NOT(黄金柱2T);BACKSET301T:=BACKSET(黄金柱3T,5);FILTER301T:=FILTER(BACKSET301T,4);黄金柱3:=基价柱阳AND 均价升AND 量渐减AND 不破价顶AND 不破价底AND NOT(黄金柱1) AND NOT(黄金柱2) AND NOT(黄金柱1T) AND NOT(黄金柱2T);BACKSET301:=BACKSET(黄金柱3,4);FILTER301:=FILTER(BACKSET301,3);黄金柱31:=黄金柱3 AND REF(黄金柱3,1);BACKSET3011:=BACKSET(黄金柱31,4);FILTER3011:=FILTER(BACKSET3011,3);黄金柱32:=黄金柱3 AND REF(黄金柱3,2);BACKSET3012:=BACKSET(黄金柱32,4);FILTER3012:=FILTER(BACKSET3012,3);黄金柱33:=黄金柱3 AND REF(黄金柱3,3);BACKSET3013:=BACKSET(黄金柱33,4);FILTER3013:=FILTER(BACKSET3013,3);黄金柱4T:=基价柱阳 AND 均价升 AND 均量减 AND 不破价顶AND 不破价底 AND 基前跳空 AND NOT(黄金柱1) AND NOT(黄金柱1T) AND NOT(黄金柱2) AND NOT(黄金柱2T) AND NOT(黄金柱3) AND NOT(黄金柱3T);FILTER401T:=FILTER(BACKSET401T,4);黄金柱4:=基价柱阳AND 均价升AND 均量减AND 不破价顶AND 不破价底AND NOT(黄金柱1) AND NOT(黄金柱2) AND NOT(黄金柱3) AND NOT(黄金柱1T) AND NOT(黄金柱2T) AND NOT(黄金柱3T);BACKSET401:=BACKSET(黄金柱4,4);FILTER401:=FILTER(BACKSET401,3);黄金柱41:=黄金柱4 AND REF(黄金柱4,1);BACKSET4011:=BACKSET(黄金柱41,4);FILTER4011:=FILTER(BACKSET4011,3);黄金柱42:=黄金柱4 AND REF(黄金柱4,2);BACKSET4012:=BACKSET(黄金柱42,4);FILTER4012:=FILTER(BACKSET4012,3);黄金柱43:=黄金柱4 AND REF(黄金柱4,3);BACKSET4013:=BACKSET(黄金柱43,4);FILTER4013:=FILTER(BACKSET4013,3);黄金柱5T:=基价柱阳 AND 均价升 AND 价量比 AND 不破价顶AND 不破价底 AND 基前跳空 AND NOT(黄金柱1) AND NOT(黄金柱2) AND NOT(黄金柱3) AND NOT(黄金柱4) AND NOT(黄金柱1T) AND NOT(黄金柱2T) AND NOT(黄金柱3T) AND NOT(黄金柱4T);BACKSET501T:=BACKSET(黄金柱5T,5);FILTER501T:=FILTER(BACKSET501T,4);黄金柱5:=基价柱阳AND 均价升AND 价量比AND 不破价顶AND 不破价底AND NOT(黄金柱1) AND NOT(黄金柱2) AND NOT(黄金柱3) AND NOT(黄金柱4) AND NOT(黄金柱1T) AND NOT(黄金柱2T) AND NOT(黄金柱3T) AND NOT(黄金柱4T);BACKSET501:=BACKSET(黄金柱5,4);FILTER501:=FILTER(BACKSET501,3);黄金柱51:=黄金柱5 AND REF(黄金柱5,1);FILTER5011:=FILTER(BACKSET5011,3);黄金柱52:=黄金柱5 AND REF(黄金柱5,2);BACKSET5012:=BACKSET(黄金柱52,4);FILTER5012:=FILTER(BACKSET5012,3);黄金柱53:=黄金柱5 AND REF(黄金柱5,3);BACKSET5013:=BACKSET(黄金柱53,4);FILTER5013:=FILTER(BACKSET5013,3);黄金柱6T:=基价柱阳 AND 均价升 AND 日价量比升 AND 不破价顶 AND 不破价底 AND 基前跳空 AND NOT(黄金柱1) AND NOT(黄金柱2) AND NOT(黄金柱3) AND NOT(黄金柱4) AND NOT(黄金柱5) AND NOT(黄金柱1T) AND NOT(黄金柱2T) AND NOT(黄金柱3T) AND NOT(黄金柱4T) AND NOT(黄金柱5T);BACKSET601T:=BACKSET(黄金柱6T,5);FILTER601T:=FILTER(BACKSET601T,4);黄金柱6:=基价柱阳 AND 均价升 AND 日价量比升 AND 不破价顶AND 不破价底AND NOT(黄金柱1) AND NOT(黄金柱2) AND NOT(黄金柱3) AND NOT(黄金柱4) AND NOT(黄金柱5) AND NOT(黄金柱1T) AND NOT(黄金柱2T) AND NOT(黄金柱3T) AND NOT(黄金柱4T) AND NOT(黄金柱5T);BACKSET601:=BACKSET(黄金柱6,4);FILTER601:=FILTER(BACKSET601,3);黄金柱61:=黄金柱6 AND REF(黄金柱6,1);BACKSET6011:=BACKSET(黄金柱61,4);FILTER6011:=FILTER(BACKSET6011,3);黄金柱62:=黄金柱6 AND REF(黄金柱6,2);BACKSET6012:=BACKSET(黄金柱62,4);FILTER6012:=FILTER(BACKSET6012,3);黄金柱63:=黄金柱6 AND REF(黄金柱6,3);BACKSET6013:=BACKSET(黄金柱63,4);FILTER6013:=FILTER(BACKSET6013,3);FIL1:=(FILTER101 AND NOT(REF(FILTER101,4))) OR (FILTER1011 AND NOT(REF(FILTER1011,4))) OR (FILTER1012 AND NOT(REF(FILTER1012,4))) OR (FILTER1013 AND NOT(REF(FILTER1013,4)));FIL2:=(FILTER201 AND NOT(REF(FILTER201,4))) OR (FILTER2011 AND NOT(REF(FILTER2011,4))) OR (FILTER2012 AND NOT(REF(FILTER2012,4))) OR (FILTER2013 AND NOT(REF(FILTER2013,4)));FIL3:=(FILTER301 AND NOT(REF(FILTER301,4))) OR (FILTER3011 AND NOT(REF(FILTER3011,4))) OR (FILTER3012 AND NOT(REF(FILTER3012,4))) OR (FILTER3013 AND NOT(REF(FILTER3013,4)));FIL4:=(FILTER401 AND NOT(REF(FILTER401,4))) OR (FILTER4011 AND NOT(REF(FILTER4011,4))) OR (FILTER4012 AND NOT(REF(FILTER4012,4))) OR (FILTER4013 AND NOT(REF(FILTER4013,4)));FIL5:=(FILTER501 AND NOT(REF(FILTER501,4))) OR (FILTER5011 AND NOT(REF(FILTER5011,4))) OR (FILTER5012 AND NOT(REF(FILTER5012,4))) OR (FILTER5013 AND NOT(REF(FILTER5013,4)));FIL6:=(FILTER601 AND NOT(REF(FILTER601,4))) OR (FILTER6011 AND NOT(REF(FILTER6011,4))) OR (FILTER6012 AND NOT(REF(FILTER6012,4))) OR (FILTER6013 AND NOT(REF(FILTER6013,4)));FIL:=FIL1 OR FIL2 OR FIL3 OR FIL4 OR FIL5 OR FIL6;STICKLINE(FIL AND NOT(REF(FIL,4)),OPEN,CLOSE,3,0),COLOR0099FF;DRAWTEXT (FIL AND NOT(REF(FIL,4)),LOW*0.986,'↖黄金柱'),COLOR0099FF;K1:=SUMBARS(FIL,1);STICKLINE(K1 AND 金线=1,REF(C,K1-1),REF(C,K1-1),10,0),COLOR8822FF;FIL1T:=(FILTER101T AND NOT(REF(FILTER101T,5)));FIL2T:=(FILTER201T AND NOT(REF(FILTER201T,5)));FIL3T:=(FILTER301T AND NOT(REF(FILTER301T,5)));FIL4T:=(FILTER401T AND NOT(REF(FILTER401T,5)));FIL5T:=(FILTER501T AND NOT(REF(FILTER501T,5)));FIL6T:=(FILTER601T AND NOT(REF(FILTER601T,5)));FILT:=FIL1T OR FIL2T OR FIL3T OR FIL4T OR FIL5T OR FIL6T;STICKLINE(FILT AND NOT(REF(FILT,5)),OPEN,CLOSE,3,0),COLOR0000FF;DRAWTEXT (FILT AND NOT(REF(FILT,5)),LOW*0.978,'↖元帅柱'),COLOR0000FF;K2:=SUMBARS(FILT,1);STICKLINE(K2 AND 金线=1,REF(C,K2-1),REF(C,K2-1),10,0),COLOR8822FF;黄金柱LJ:=(黄金柱1 OR 黄金柱2 OR 黄金柱3 OR 黄金柱4 OR 黄金柱5 OR 黄金柱6 ) AND 均线 AND 临界点;BACKSET10LJ:=BACKSET(黄金柱LJ ,4);FILTER10LJ:=FILTER(BACKSET10LJ,3);STICKLINE(FILTER10LJ AND NOT(REF(FILTER10LJ,4)),OPEN,CLOSE,3,0),COLOR0099FF;DRAWTEXT(FILTER10LJ AND NOT(REF(FILTER10LJ,4)) ,LOW*0.958,'↖临界点'),COLOR0099FF;黄金柱LJT:=(黄金柱1T OR 黄金柱2T OR 黄金柱3T OR 黄金柱4T OR 黄金柱5T OR 黄金柱6T) AND 均线 AND 临界点 ;BACKSET10LJT:=BACKSET(黄金柱LJT ,5);FILTER10LJT:=FILTER(BACKSET10LJT,5);STICKLINE(FILTER10LJT ANDNOT(REF(FILTER10LJT,4)),OPEN,CLOSE,3,0),COLOR0099FF;DRAWTEXT(FILTER10LJT AND NOT(REF(FILTER10LJT,4)) ,LOW*0.958,'↖临界点'),COLOR0099FF;C2:=REF(C,1);涨停:=IF((C-C2)*100/C2>=(10-0.01*100/C2),1,0);STICKLINE(涨停,OPEN,CLOSE,2,0),COLORFF00FF;STICKLINE(涨停,H,L,0,0),COLORFF00FF;跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2),1,0);STICKLINE(跌停,OPEN,CLOSE,2,0),COLORGREEN;STICKLINE(跌停,H,L,0,1),COLORGREEN;N:=10;。
通达信公式指标源码止盈主图指标公式.docx
通达信止盈主图指标公式VARl:=(HIGH+L0W+0PEN+CL0SE)/4;黄金线:=EMA(3*VAR1-2*SMA(VAR1,2,1),13)Z COLORYELLOW Z LINETHICK2; CJ:=(3*C+L+O+H)/6;多空线:=(20*CJ+19*REF(CJ,l)+18*REF(CJ,2)+17*REF(CJ,3)+16*REF(CJ,4)+15* REF(CJ,5)+14*REF(CJ/6)+13*REF(CJ,7)+12*REF(CJ,8)+ll*REF(CJ,9)+10* REF(CJ」0)+9*REF(CJ,ll)+8*REF(CJ」2)+7*REF(CJ,13)+6*REF(CJ,14)+5* REF(CJ,15)+4*REF(CJ/16)+3*REF(CJ」7)+2*REF(CJ,18)+REF(CJ/20))/210, COLORFFOOFF 丄INETHICK2;亚当:=((HIGH + LOW + CLOSE)/3-MA((HIGH + LOW + CLOSE)/3,14))*100/ (1・5*AVEDEV((HIGH + LOW + CLOSE)/3,14));N: = l,100,12;夏娃: = EMA(亚当,N); X2:=亚当;X3:=夏娃;STICKLINE(X2>=X3z LOW,HIGH z O,0),COLORRED;STICKLINE(X2>=X3,CLOSE,OPEN z3z O)z COLOROOOOAA;STICKLINE(X2>=X3Z CLOSE,OPEN Z2,0)Z COLOROOOOCC;STICKLINE(X2>=X3,CLOSE,OPEN Z1,0)Z COLOROOOODD;STICKLINE(X2>=X3,CLOSE,OPEN,0.3,0),COLOROOOOFF;STICKLINE(X2<X3,CLOSE,OPEN,0.3,0),COLORFFFFOO;STICKLINE(X2<X3,CLOSE Z OPEN Z1,0),COLORDDDDOO;STICKLINE(X2<X3,CLOSE,OPEN Z2,0),COLORAAAAOO;STICKLINE(X2<X3z CLOSE z OPEN z3z O),COLOR888800;STICKLINE(X2<X3,LOW z HIGH,O z O),COLORFFFFOO;STICKLINE(X2vX3 ANDC〉=黄金线AND 黄金线> =多空线z OPEN z CLOSE z3z O),COLORFFOOFF;STICKLINE(X2<X3 AND C> =多空线AND Cv黄金线Z OPEN,CLOSER,0),COLORBLUE;Xl:=(C+L+H)/3;BB13:=ATAN(EMA(X1Z13)-REF(EMA(X1Z13)Z1))*3.1416*1O;EMA8:=EMA(C Z8);DRAWTEXT(FILTER(BB13>1 AND EMA(X1,13)>REF(EMA(X1,8),1),10), EMA8/Z45 fl-1),COLORWHITE;E1:=BARSCOUNT(C);AH:=HHV(H,200);AL:=LLV(L,200);B0:=(AH-AL)/40;KBl:=H+B0;KB2:=L-B0;STICKLINE((E1+0)/34=FLOOR((E1+0)/34)Z KB2Z KB2-0.8*BO,1,0),COLORYELL OW 丄INETHICK3;DRAWTEXT((El+0)/34=FLOOR((El+0)/34),KB2-B0/,时窗'),COLORYELLOW; VAR81: = 1;VAR82:=((((2*CLOSE)+HIGH)+LOW) / 4);低金叉进:=20,COLORYELLOW,LINETHICK2;高死叉岀:=90,COLORGREEN 丄INETHICK3;VAR84:=LLV(LOW Z5);VAR85:=HHV(HIGH,4);C1:=(EMA((((VAR82-VAR84)/(VAR85・VAR84))*100),4)*VAR81),COLORFF00FF ,LINETHICK2;C2:=(EMA(((0.667*REF(C1,1))+(0.333*C1)),2)*VAR81),COLORFFFFFF,LINET HICK2;条件:=CROSS(C1,C2) AND Cl<40;条件0:=CROSS(C2,C1) AND Cl>90;TJ1:=CROSS(C1,C2);TJ2:=CROSS(C2,C1);TJ3:=CROSS(C1Z C2) AND REF(Cl,l)<20;TJ4:=CROSS(C2,C1) AND REF(Cl」)>80;DRAWTEXT(条件0Z H*1.02;S,)Z COLORBLUE;{DRAWTEXT(CROSS(C1Z75)Z H*1.013/,险区'),COLORGREEN;} DRAWTEXT(TJ3/L*0.98;买jCOLORFFOOFF;均线:=MA(C,13)Z COLOROOFFFF;X8:=,,MACD.MACD n;X:=HHV(REF(X8,l),BARSLAST(X8>0)+l);A8:=(X8/REF(X8z l)-l)*100;Al: = BARSLAST(CROSS(0,A8))+1;DRAWTEXT(X8>0.618 AND CROSS(X,X8),H*1.035;止赢COLORBLUE; STICKLINE(X8>0.618 AND CROSS(X,X8)Z H*1.02,H*1.021,20,1),COLORBLUE; DRAWTEXT(REF(C z BARSLAST(REF(CROSS(,,MACD.DIF n,,,MACD.DEA H),l))+l)> C ANDREF(,,MACD.DIF,,Z BARSLAST(REF(CROSS(,,MACD.DIF,,;,MACD.DEA,,),1))+1) <"MACD.DIF n AND CROSS(n MACD.DIF',,,,MACD.DEA n) >0,L-0.02;*M'),COLORFF00FF;{MACD 底背离}DRAWTEXT(REF(C z BARSLAST(REF(CROSS(,,KDJ.K,,z,,KDJ.D n\l))4-l)>C AND REF(“KDJ・K:BARSLAST(REF(CROSS(”KDJ・KTKDJ・D”),l))+l)v“KDJ・ie AND CROSSC,KDJ.K,,,,,KDJ.D n)丄・0・10,©K)COLORFF00FF;{KDJ 底背离} DRAWTEXT(REF(C,BARSLAST(REF(CROSS(,,RSI.RSIl n,n RSLRSI2,l)z l))+l)>CANDREFCRSI・RSI1:BARSLAST(REF(CROSS(”RSLRSI1TRSI・RSI2J1))+1) <,,RSI.RSI1" AND CROSS(“RSI・RSI1TRSI・RSI2”)>O,L-O.18,,0R,),COLORFFOOFF;{RSI 底背离};DRAWTEXT(REF(C,BARSLAST(REF(CROSS(,,MACD.DEA,7,MACD.DIF n)z l))+l)< C ANDREF(,,MACD.DIF,I/BARSLAST(REF(CROSS(,,MACD.DEA,,Z,,MACD.DIF,,),1))+1) >n MA CD.DIF H AND CROSS(”MACD・DEATMACD・DIF“)>0,H+0・16,*M)COLORGREEN;{MACD 顶背离};DRAWTEXT(REF(C,BARSLAST(REF(CROSS(H KDJ.D,,;,KDJ.K,I),1))+1)<CAND REF(,,KDJ.K,,Z BARSLAST(REF(CROSS(,,KDJ.D,,Z,,KDJ.K,,)Z1))+1) >"KDJ.K n AND CROSSC,KDJ.D,7,KDJ.K,,)>0,H+0.08,,©K,)Z COLORGREEN;{KDJ 顶背离}DRAWTEXT(REF(C,BARSLAST(REF(CR0SS(,,RSLRSI2,,,n RSLRSIl H)z l))+l)<CANDREFC,RSLRSI1,,,BARSLAST(REF(CR0SS(,,RSLRSI2,,Z,,RSI.RSI1,,)Z1))+1)>,,RSL RSI1"ANDCROSSC,RSLRSI2,I Z,,RSI.RSI1H)>0Z H+0.04/♦R,)Z COLORGREEN;{RSI 顶背离};CCC:C,COLORFFFFFF;UPPER : MA(CLOSE,14)*1.06,POINTDOT Z COLORFF99FF Z LINETHICK2;LOWER : MA(CLOSE,14)*0.94,POINTDOT,COLORFFOOFF丄INETHICK2;MID:(UPPER+LOWER)/2,NODRAW,COLOROOFFFF 丄INETHICK1;VAR91:=(2*CLOSE+HIGH+LOW+OPEN)/5;A51:(EMA(VAR91z l)+EMA(VAR91/2)+EMA(VAR91,3)+EMA(VAR91,4))/4,COLORCY AN,LINETHICK1;W51:=(EMA(VAR91,1)+EMA(VAR91,2)+EMA(VAR91,3)+EMA(VAR91,4))/4; DRAWICON(CROSS(UPPER,CCC),UPPER Z15);。
【指标公式源码下载】通达信终极黄金主图指标公式【短线关注、控制风险、逃顶、低吸】
通达信终极黄金主图指标公式【短线关注、控制风险、逃顶、低吸】DIFF:=EMA(C,5)-EMA(C,20);DEA:=EMA(DIFF,10);MACD:=2*(DIFF-DEA);JC:=CROSS(DIFF,DEA);SC:=CROSS(DEA,DIFF);DCJC:=JC AND DEA>0;VAR1:=1;VAR2:=(CLOSE-MA(CLOSE,30))/MA(CLOSE,30)*100;VAR3:=CLOSE>OPEN AND OPEN-LOW>HIGH-CLOSE;VAR4:=REF(VAR2,1)<-20 AND VAR3;VAR5:=REF(VAR2,1)<-20 AND CLOSE>OPEN AND (CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*1000>20;VAR6:=FILTER(VAR4 OR VAR5,3);VAR7:=OPEN>CLOSE AND HIGH-IF(CLOSE>OPEN,CLOSE,OPEN)>IF(OPEN<CLOSE,OPEN,CLOSE)-LOW;VAR8:=REF(VAR2,1)>ABS(-20) AND VAR7;VAR9:=REF(VAR2,1)>ABS(-20) AND CLOSE<OPEN AND (REF(CLOSE,1)-CLOSE)/REF(CLOSE,1)*1000>20;VARA:=FILTER(VAR8 OR VAR9,3);VARB:=CLOSE>OPEN AND OPEN-LOW>HIGH-CLOSE;VARC:=REF(VAR2,1)<-13 AND VAR3;VARD:=REF(VAR2,1)<-13 AND CLOSE>OPEN AND (CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*1000>20;VARE:=FILTER(VARC OR VARD,3);VARF:=OPEN>CLOSE AND HIGH-IF(CLOSE>OPEN,CLOSE,OPEN)>IF(OPEN<CLOSE,OPEN,CLOSE)-LOW;VAR10:=REF(VAR2,1)>ABS(-13) AND VAR7;VAR11:=REF(VAR2,1)>ABS(-13) AND CLOSE<OPEN AND (REF(CLOSE,1)-CLOSE)/REF(CLOSE,1)*1000>20;VAR12:=FILTER(VAR10 OR VAR11,3);DRAWTEXT(VARE*VAR1>0,LOW,'短线关注'),COLORRED;DRAWTEXT(VAR12*VAR1>0,HIGH,'控制风险'),COLORCYAN ;LC:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;DRAWTEXT(CROSS(84,RSI) , HIGH,'→逃顶'),COLORBLUE ; DRAWTEXT(CROSS(RSI,11) , LOW,'→低吸'),COLORRED ; JJ:=(CLOSE+HIGH+LOW)/3;A:=EMA(JJ,5);B:=REF(A,1);终极黄金:STICKLINE(A>B,A,B,5,0),COLORC44CF0;一卸千里:STICKLINE(A<B,A,B,5,0),COLORBLUE;天籁:HHV(HIGH,35),COLORRED,LINETHICK2;地籁:LLV(LOW,55),COLORRED,LINETHICK2;三十四日:MA(CLOSE,34);八十九日:MA(CLOSE,89);一百四十四日:MA(CLOSE,144);无穷成本均线: DMA(CLOSE,VOL/CAPITAL),LINET HICK2;。
黄金法则通达信指标公式源码
黄金法则:————————————————————————;本公式与撑压线为一母双胎指标;都是以缠论高点母本;本指标是撑压线的简化指标;与撑压线不同的是:1.去掉撑压线划线指标;2.增加单阳测顶与单阴测底;————————————————————————;本指标包含以下五大功能(废除两项):————————————————————————;一:黄金分割(自动判断是下跌还是上涨):1.黄金分割有两种算法,一种用高低区间;一种用低位算法;2.本公式采用高低区间算法,具体如下:高位下跌:a:计算高位和前低位的区间;b:H-区间*黄金分割点;低位上涨:a:计算低位和前高位的区间;b:L+区间*黄金分割点;高位下跌为浅粉红色;低位上涨为浅姜黄色;————————————————————————;即下跌有;高位下跌的黄金分割;上涨也有;低位上涨的黄金分割;————————————————————————;二:十等分(废除);————————————————————————;三:单阴测底与单阳测顶(参数写死,不能修改);采用徐小明的算法:进行测算;大盘采用正负3%为模;参数:X;个股采用正负6%为模;参数:Y;取模周期为低点5T天;参数:D;总周期为30T,参数:T;**参数k可以设置是否显示:1显示,0隐藏** ————————————————————————;四:高低点提示(废除):1.灰色横线:高点压力低点支撑;2.白色数字:高低点价格;高低点线可以看出中枢(箱体)上下沿;————————————————————————;五:集成简化版九转提示:黄点:九转“8”;笑脸哭脸:九转“9”;……;—————————————————————————————;2016-7-23日更新:1.去除黄金分割的多余显示;即显示低位,前面显示高位的标志-竖线;2.增加参数K;设置是否显示单阳测顶,单阴测底;3.增加显示多转显示,默认18,即重点显示9-13-18;t:=30;k:=0;HJ_1:=BACKSET(LLV(LOW,5)<REF(LLV(LOW,4),1),4);HJ_2:=BACKSET(HJ_1=0 AND REF(HJ_1,1)=1,2);HJ_3:=IF(HJ_2=1 AND REF(HJ_2,1)=0,(-1),0);HJ_4:=BACKSET(HHV(HIGH,5)>REF(HHV(HIGH,4),1),4);HJ_5:=BACKSET(HJ_4=0 AND REF(HJ_4,1)=1,2);HJ_6:=IF(HJ_5=1 AND REF(HJ_5,1)=0,1,0);HJ_7:=IF(LOW>REF(HIGH,1),1,IF(HIGH<REF(LOW,1),(-1),0));HJ_8:=BARSLAST(HJ_6=1);HJ_9:=BARSLAST(HJ_3=(-1));HJ_10:=LOWRANGE(LOW);HJ_11:=TOPRANGE(HIGH);HJ_12:=IF(HJ_3=(-1) AND REF(HJ_8,1)>REF(HJ_9,1) AND LLV(LOW,HJ_8+1)<REF(LLV(LOW,HJ_8+1),1),(-1),0);HJ_13:=IF(HJ_3=(-1) AND REF(HJ_8,1)<=REF(HJ_9,1) AND (HJ_8>=4 OR LLV(HJ_7,HJ_8)=(-1) OR LLV(LOW,HJ_9+2)<REF(LLV(LOW,HJ_9+1),1)),(-1),0);HJ_14:=IF(HJ_12=(-1) OR HJ_13=(-1) AND LOW<REF(HIGH,HJ_8+1),(-1),0);HJ_15:=IF(HJ_9<4 AND HHV(HJ_7,HJ_9)!=1 OR REF(HJ_14,HJ_9)=0,1,0);HJ_16:=IF(HJ_6=1 AND REF(HJ_9,1)<=REF(HJ_8,1) AND HJ_15=1 AND HJ_11>REF(HJ_10,HJ_9+1) AND HJ_11>REF(HJ_10,HJ_9) AND HJ_11>REF(HJ_11,HJ_8),1,0);HJ_17:=IF(HJ_6=1 AND REF(HJ_9,1)>REF(HJ_8,1) AND HHV(HIGH,HJ_9+1)>REF(HHV(HIGH,HJ_9+1),1),1,0);HJ_18:=IF(HJ_6=1 AND REF(HJ_9,1)<=REF(HJ_8,1) AND REF(HJ_14,HJ_9)=(-1) AND(HJ_9>=4 OR HHV(HJ_7,HJ_9)=1),1,0);HJ_19:=IF(HJ_17=1 OR HJ_18=1 OR HJ_16=1 AND HIGH>REF(LOW,HJ_9+1),1,0);HJ_20:=IF(HJ_8<4 AND HHV(HJ_7,HJ_8)!=1 OR REF(HJ_19,HJ_8)=0,1,0);HJ_21:=IF(HJ_3=(-1) AND REF(HJ_8,1)<=REF(HJ_9,1) AND HJ_20=1 AND HJ_10>REF(HJ_11,HJ_8+1) AND HJ_10>REF(HJ_11,HJ_8) AND HJ_10>REF(HJ_10,HJ_9),(-1),0);HJ_22:=IF(HJ_3=(-1) AND REF(HJ_8,1)>REF(HJ_9,1) AND LLV(LOW,HJ_8+1)<REF(LLV(LOW,HJ_8+1),1),(-1),0);HJ_23:=IF(HJ_3=(-1) AND REF(HJ_8,1)<=REF(HJ_9,1) AND (HJ_8>=4 OR LLV(HJ_7,HJ_8)=(-1) OR HJ_21=(-1)),(-1),0);HJ_24:=IF(HJ_22=(-1) OR HJ_23=(-1) AND LOW<REF(HIGH,HJ_8+1),(-1),0);HJ_25:=BARSLAST(HJ_19=1);HJ_26:=BARSLAST(HJ_24=(-1));HJ_27:=IF(HJ_26<4 AND HHV(HJ_7,HJ_26)!=1 OR REF(HJ_24,HJ_26)=0,1,0);HJ_28:=IF(HJ_6=1 AND REF(HJ_26,1)<=REF(HJ_25,1) AND HJ_27=1 AND HJ_11>REF(HJ_10,HJ_26+1) AND HJ_11>REF(HJ_10,HJ_26) AND HJ_11>REF(HJ_11,HJ_25),1,0);HJ_29:=IF(HJ_6=1 AND REF(HJ_26,1)>REF(HJ_25,1) AND HHV(HIGH,HJ_26+1)>REF(HHV(HIGH,HJ_26+1),1),1,0);HJ_30:=IF(HJ_6=1 AND REF(HJ_26,1)<=REF(HJ_25,1) AND REF(HJ_24,HJ_26)=(-1) AND (HJ_26>=4 OR HHV(HJ_7,HJ_26)=1),1,0);HJ_31:=IF(HJ_29=1 OR HJ_30=1 OR HJ_28=1 AND HIGH>REF(LOW,HJ_26+1),1,0); HJ_32:=IF(HJ_25<4 AND HHV(HJ_7,HJ_25)!=1 OR REF(HJ_29,HJ_25)=0,1,0);HJ_33:=IF(HJ_3=(-1) AND REF(HJ_25,1)<=REF(HJ_26,1) AND HJ_32=1 AND HJ_10>REF(HJ_11,HJ_25+1) AND HJ_10>REF(HJ_11,HJ_25) AND HJ_10>REF(HJ_10,HJ_26),(-1),0);HJ_34:=IF(HJ_3=(-1) AND REF(HJ_25,1)>REF(HJ_26,1) AND LLV(LOW,HJ_25+1)<REF(LLV(LOW,HJ_25+1),1),(-1),0);HJ_35:=IF(HJ_3=(-1) AND REF(HJ_25,1)<=REF(HJ_26,1) AND (HJ_25>=4 OR LLV(HJ_7,HJ_25)=(-1) OR HJ_33=(-1)),(-1),0);HJ_36:=IF(HJ_34=(-1) OR HJ_35=(-1) AND LOW<REF(HIGH,HJ_25+1),(-1),0);HJ_37:=BARSLAST(HJ_31=1);HJ_38:=BARSLAST(HJ_36=(-1));HJ_39:=IF(HJ_38<4 AND HHV(HJ_7,HJ_38)!=1 OR REF(HJ_36,HJ_38)=0,1,0);HJ_40:=IF(HJ_6=1 AND REF(HJ_38,1)<=REF(HJ_37,1) AND HJ_39=1 AND HJ_11>REF(HJ_10,HJ_38+1) AND HJ_11>REF(HJ_10,HJ_38) AND HJ_11>REF(HJ_11,HJ_37),1,0);HJ_41:=IF(HJ_6=1 AND REF(HJ_38,1)>REF(HJ_37,1) AND HHV(HIGH,HJ_38+1)>REF(HHV(HIGH,HJ_38+1),1),1,0);HJ_42:=IF(HJ_6=1 AND REF(HJ_38,1)<=REF(HJ_37,1) AND REF(HJ_36,HJ_38)=(-1) AND (HJ_38>=4 OR HHV(HJ_7,HJ_38)=1),1,0);HJ_43:=IF(HJ_41=1 OR HJ_42=1 OR HJ_40=1 AND HIGH>REF(LOW,HJ_38+1),1,0); HJ_44:=IF(HJ_37<4 AND HHV(HJ_7,HJ_37)!=1 OR REF(HJ_41,HJ_37)=0,1,0);HJ_45:=IF(HJ_3=(-1) AND REF(HJ_37,1)<=REF(HJ_38,1) AND HJ_44=1 ANDHJ_10>REF(HJ_11,HJ_37+1) AND HJ_10>REF(HJ_11,HJ_37) AND HJ_10>REF(HJ_10,HJ_38),(-1),0);HJ_46:=IF(HJ_3=(-1) AND REF(HJ_37,1)>REF(HJ_38,1) AND LLV(LOW,HJ_37+1)<REF(LLV(LOW,HJ_37+1),1),(-1),0);HJ_47:=IF(HJ_3=(-1) AND REF(HJ_37,1)<=REF(HJ_38,1) AND (HJ_37>=4 OR LLV(HJ_7,HJ_37)=(-1) OR HJ_45=(-1)),(-1),0);HJ_48:=IF(HJ_46=(-1) OR HJ_47=(-1) AND LOW<REF(HIGH,HJ_37+1),(-1),0);HJ_49:=IF(HJ_43=1 AND HJ_48=(-1) AND HIGH>REF(HIGH,REF(HJ_37,1)+2),1,IF(HJ_43=1 AND HJ_48=(-1) AND LOW<REF(LOW,REF(HJ_38,1)+2),(-1),0));HJ_50:=IF(HJ_49=0,HJ_43+HJ_48,HJ_49);HJ_51:=IF(DATE<1161215,1,0);HJ_52:=IF(HJ_50=(-1),LOW,IF(HJ_50=1,HIGH,DRAWNULL));HJ_53:=DRAWLINE(HJ_50=(-1),HJ_52,HJ_50=1,HJ_52,0);HJ_54:=DRAWLINE(HJ_50=1,HJ_52,HJ_50=(-1),HJ_52,0);HJ_55:=HJ_53=HJ_54 AND HJ_4 AND HJ_50=1;HJ_56:=IF(HJ_55,HIGH*HJ_51,DRAWNULL);HJ_57:=HJ_53=HJ_54 AND HJ_1 AND HJ_50=(-1);HJ_58:=IF(HJ_57,LOW*HJ_51,DRAWNULL);HJ_59:=LLV(LOW,T)=HJ_58*HJ_51;HJ_60:=BARSLAST(HJ_59);HJ_61:=HHV(HIGH,T)=HJ_56*HJ_51;HJ_62:=BARSLAST(HJ_61);HJ_63:=IF(HJ_62>HJ_60,0,1);HJ_64:=BACKSET(ISLASTBAR,HJ_62+1);HJ_65:=BARSLAST(HJ_64=1 AND REF(HJ_64,1)=0);HJ_66:=BACKSET(ISLASTBAR,HJ_60+1);HJ_67:=BARSLAST(HJ_66=1 AND REF(HJ_66,1)=0);HJ_68:=IF(HJ_65>HJ_67,0,1);HJ_69:=IF(HJ_63=0 AND HJ_68=0,REF(HIGH,HJ_62)-REF(LOW,HJ_60),DRAWNULL); STICKLINE(HJ_66=1 AND REF(HJ_66,1)=0 AND HJ_63=0 AND HJ_68=0,REF(LOW,HJ_60),REF(LOW,HJ_60)+HJ_69*1,0.5,(-1)),COLOR0065CA; NOTEXT0:IF(HJ_63=0 AND HJ_68=0,DRAWLINE(HJ_59,LOW,ISLASTBAR,REF(LOW,HJ_60)+HJ_69*0,(-1)),DRAWNUL L),DOTLINE,COLOR0065CA;DRAWNUMBER(ISLASTBAR AND HJ_63=0 AND HJ_68=0,NOTEXT0,REF(LOW,HJ_60)),COLOR0065CA;DRAWNUMBER(HJ_59 AND HJ_63=0 AND HJ_68=0,NOTEXT0,0),COLOR0065CA; NOTEXT1:IF(HJ_63=0 AND HJ_68=0,DRAWLINE(HJ_59,LOW+HJ_69*0.191,ISLASTBAR,REF(LOW,HJ_60)+HJ_69*0. 191,(-1)),DRAWNULL),DOTLINE,COLOR0065CA;DRAWNUMBER(ISLASTBAR AND HJ_63=0 AND HJ_68=0,NOTEXT1,REF(LOW,HJ_60)+HJ_69*0.191),COLOR0065CA; DRAWNUMBER(HJ_59 AND HJ_63=0 AND HJ_68=0,NOTEXT1,0.191),COLOR0065CA;NOTEXT3:IF(HJ_63=0 AND HJ_68=0,DRAWLINE(HJ_59,LOW+HJ_69*0.382,ISLASTBAR,REF(LOW,HJ_60)+HJ_69*0. 382,(-1)),DRAWNULL),DOTLINE,COLOR0065CA;DRAWNUMBER(ISLASTBAR AND HJ_63=0 AND HJ_68=0,NOTEXT3,REF(LOW,HJ_60)+HJ_69*0.382),COLOR0065CA; DRAWNUMBER(HJ_59 AND HJ_63=0 AND HJ_68=0,NOTEXT3,0.382),COLOR0065CA; NOTEXT5:IF(HJ_63=0 AND HJ_68=0,DRAWLINE(HJ_59,LOW+HJ_69*0.5,ISLASTBAR,REF(LOW,HJ_60)+HJ_69*0.5,( -1)),DRAWNULL),DOTLINE,COLOR0065CA;DRAWNUMBER(ISLASTBAR AND HJ_63=0 AND HJ_68=0,NOTEXT5,REF(LOW,HJ_60)+HJ_69*0.5),COLOR0065CA;DRAWNUMBER(HJ_59 AND HJ_63=0 AND HJ_68=0,NOTEXT5,0.5),COLOR0065CA; NOTEXT6:IF(HJ_63=0 AND HJ_68=0,DRAWLINE(HJ_59,LOW+HJ_69*0.618,ISLASTBAR,REF(LOW,HJ_60)+HJ_69*0. 618,(-1)),DRAWNULL),DOTLINE,COLOR0065CA;DRAWNUMBER(ISLASTBAR AND HJ_63=0 AND HJ_68=0,NOTEXT6,REF(LOW,HJ_60)+HJ_69*0.618),COLOR0065CA; DRAWNUMBER(HJ_59 AND HJ_63=0 AND HJ_68=0,NOTEXT6,0.618),COLOR0065CA; NOTEXT8:IF(HJ_63=0 AND HJ_68=0,DRAWLINE(HJ_59,LOW+HJ_69*0.809,ISLASTBAR,REF(LOW,HJ_60)+HJ_69*0. 809,(-1)),DRAWNULL),DOTLINE,COLOR0065CA;DRAWNUMBER(ISLASTBAR AND HJ_63=0 AND HJ_68=0,NOTEXT8,REF(LOW,HJ_60)+HJ_69*0.809),COLOR0065CA; DRAWNUMBER(HJ_59 AND HJ_63=0 AND HJ_68=0,NOTEXT8,0.809),COLOR0065CA; NOTEXT2:IF(HJ_63=0 AND HJ_68=0,DRAWLINE(HJ_59,REF(HIGH,HJ_62),ISLASTBAR,REF(LOW,HJ_60)+HJ_69*1,(-1)),DRAWNULL),DOTLINE,COLOR0065CA;DRAWNUMBER(ISLASTBAR AND HJ_63=0 AND HJ_68=0,NOTEXT2,REF(LOW,HJ_60)+HJ_69*1),COLOR0065CA;DRAWNUMBER(HJ_59 AND HJ_63=0 AND HJ_68=0,NOTEXT2,1),COLOR0065CA;HJ_70:=IF(HJ_63=1 AND HJ_68=1,REF(HIGH,HJ_62)-REF(LOW,HJ_60),DRAWNULL); STICKLINE(HJ_64=1 AND REF(HJ_64,1)=0 AND HJ_63=1 AND HJ_68=1,REF(HIGH,HJ_62),REF(HIGH,HJ_62)-HJ_70*1,0.5,(-1)),COLORC080FF; NOTEXTH0:IF(HJ_63=1 AND HJ_68=1,DRAWLINE(HJ_61,HIGH,ISLASTBAR,REF(HIGH,HJ_62)-HJ_70*0,(-1)),DRAWNU LL),DOTLINE,COLORC080FF;DRAWNUMBER(ISLASTBAR AND HJ_63=1 AND HJ_68=1,NOTEXTH0,REF(HIGH,HJ_62)),COLORC080FF;DRAWNUMBER(HJ_61 AND HJ_63=1 AND HJ_68=1,NOTEXTH0,0),COLORC080FF; NOTEXTH1:IF(HJ_63=1 AND HJ_68=1,DRAWLINE(HJ_61,HIGH-HJ_70*0.191,ISLASTBAR,REF(HIGH,HJ_62)-HJ_70*0. 191,(-1)),DRAWNULL),DOTLINE,COLORC080FF;DRAWNUMBER(ISLASTBAR AND HJ_63=1 AND HJ_68=1,NOTEXTH1,REF(HIGH,HJ_62)-HJ_70*0.191),COLORC080FF;DRAWNUMBER(HJ_61 AND HJ_63=1 AND HJ_68=1,NOTEXTH1,0.191),COLORC080FF; NOTEXTH3:IF(HJ_63=1 AND HJ_68=1,DRAWLINE(HJ_61,HIGH-HJ_70*0.382,ISLASTBAR,REF(HIGH,HJ_62)-HJ_70*0. 382,(-1)),DRAWNULL),DOTLINE,COLORC080FF;DRAWNUMBER(ISLASTBAR AND HJ_63=1 AND HJ_68=1,NOTEXTH3,REF(HIGH,HJ_62)-HJ_70*0.382),COLORC080FF; DRAWNUMBER(HJ_61 AND HJ_63=1 AND HJ_68=1,NOTEXTH3,0.382),COLORC080FF; NOTEXTH5:IF(HJ_63=1 AND HJ_68=1,DRAWLINE(HJ_61,HIGH-HJ_70*0.5,ISLASTBAR,REF(HIGH,HJ_62)-HJ_70*0.5,( -1)),DRAWNULL),DOTLINE,COLORC080FF;DRAWNUMBER(ISLASTBAR AND HJ_63=1 AND HJ_68=1,NOTEXTH5,REF(HIGH,HJ_62)-HJ_70*0.5),COLORC080FF; DRAWNUMBER(HJ_61 AND HJ_63=1 AND HJ_68=1,NOTEXTH5,0.5),COLORC080FF; NOTEXTH6:IF(HJ_63=1 AND HJ_68=1,DRAWLINE(HJ_61,HIGH-HJ_70*0.618,ISLASTBAR,REF(HIGH,HJ_62)-HJ_70*0. 618,(-1)),DRAWNULL),DOTLINE,COLORC080FF;DRAWNUMBER(ISLASTBAR AND HJ_63=1 AND HJ_68=1,NOTEXTH6,REF(HIGH,HJ_62)-HJ_70*0.618),COLORC080FF; DRAWNUMBER(HJ_61 AND HJ_63=1 AND HJ_68=1,NOTEXTH6,0.618),COLORC080FF; NOTEXTH8:IF(HJ_63=1 AND HJ_68=1,DRAWLINE(HJ_61,HIGH-HJ_70*0.809,ISLASTBAR,REF(HIGH,HJ_62)-HJ_70*0. 809,(-1)),DRAWNULL),DOTLINE,COLORC080FF;DRAWNUMBER(ISLASTBAR AND HJ_63=1 AND HJ_68=1,NOTEXTH8,REF(HIGH,HJ_62)-HJ_70*0.809),COLORC080FF; DRAWNUMBER(HJ_61 AND HJ_63=1 AND HJ_68=1,NOTEXTH8,0.809),COLORC080FF; NOTEXTH2:IF(HJ_63=1 AND HJ_68=1,DRAWLINE(HJ_61,REF(HIGH,HJ_62)-HJ_70*1,ISLASTBAR,REF(HIGH,HJ_62)-H J_70*1,(-1)),DRAWNULL),DOTLINE,COLORC080FF;DRAWNUMBER(ISLASTBAR AND HJ_63=1 AND HJ_68=1,NOTEXTH2,REF(HIGH,HJ_62)-HJ_70*1),COLORC080FF;DRAWNUMBER(HJ_61 AND HJ_63=1 AND HJ_68=1,NOTEXTH2,1),COLORC080FF;HJ_71:=3;HJ_72:=3;HJ_73:=5;HJ_74:=IF(CLOSE>500,HJ_71,HJ_72);HJ_75:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;HJ_76:=IF(HJ_60<=HJ_73,HHV(HJ_75,HJ_60+1),DRAWNULL);HJ_77:=IF(HJ_60<=HJ_73,HHVBARS(HJ_75,HJ_60+1),DRAWNULL);HJ_78:=IF(REF(HJ_75,HJ_77)>=HJ_74,REF(CLOSE,HJ_77)*REF(CLOSE,HJ_77)/REF(CLO SE,HJ_77+1)/0.9,DRAWNULL);HJ_79:=BACKSET(REF(HJ_75,HJ_77)>=HJ_74 AND HJ_60<=HJ_73,HJ_77+1);HJ_80:=BARSLAST(HJ_79=1 AND REF(HJ_79,1)=0);HJ_81:=BACKSET(ISLASTBAR,HJ_80+1);STICKLINE(HJ_81=1 AND REF(HJ_81,1)=0 ANDK=1,HIGH,HJ_78,0.5,(-1)),COLORYELLOW;NOTEXT测顶:IF(K=1,DRAWLINE(HJ_81=1 AND REF(HJ_81,1)=0,HJ_78,ISLASTBAR,REF(CLOSE,HJ_80)*REF(CLOSE,HJ_80)/REF(CLOSE, HJ_80+1)/0.9,(-2)),DRAWNULL),DOTLINE,COLORYELLOW;DRAWNUMBER(HJ_81=1 AND REF(HJ_81,1)=0 AND K=1,HJ_78,HJ_78),COLORYELLOW; HJ_82:=IF(HJ_62<=HJ_73,LLV(HJ_75,HJ_62+1),DRAWNULL);HJ_83:=IF(HJ_62<=HJ_73,LLVBARS(HJ_75,HJ_62+1),DRAWNULL);HJ_84:=IF(REF(HJ_75,HJ_83)<=(-HJ_74),REF(CLOSE,HJ_83)*REF(CLOSE,HJ_83)/REF(C LOSE,HJ_83+1)/1.1,DRAWNULL);HJ_85:=BACKSET(REF(HJ_75,HJ_83)<=(-HJ_74) AND HJ_62<=HJ_73,HJ_83+1);HJ_86:=BARSLAST(HJ_85=1 AND REF(HJ_85,1)=0);HJ_87:=BACKSET(ISLASTBAR,HJ_86+1);STICKLINE(HJ_87=1 AND REF(HJ_87,1)=0 AND K=1,LOW,HJ_84,0.5,(-1)),COLORCYAN; NOTEXT测底:IF(K=1,DRAWLINE(HJ_87=1 AND REF(HJ_87,1)=0,HJ_84,ISLASTBAR,REF(CLOSE,HJ_86)*REF(CLOSE,HJ_86)/REF(CLOSE, HJ_86+1)/1.1,(-2)),DRAWNULL),DOTLINE,COLORCYAN;DRAWNUMBER(HJ_87=1 AND REF(HJ_87,1)=0 AND K=1,HJ_84,HJ_84),COLORCYAN; HJ_88:=CLOSE>REF(CLOSE,4);HJ_89:=BARSLASTCOUNT(HJ_88);HJ_90:=HJ_89=18;HJ_91:=ISLASTBAR AND BETWEEN(HJ_89,1,17);HJ_92:=(BACKSET(HJ_90>0,18) OR BACKSET(HJ_91>0,HJ_89))*HJ_89; DRAWNUMBER(HJ_92>0,HIGH*1.02,HJ_92),COLORMAGENTA;DRAWNUMBER(HJ_89=9,HIGH*1.02,9),COLORGREEN;DRAWNUMBER(HJ_89=13,HIGH*1.02,13),COLORYELLOW;DRAWNUMBER(HJ_89=18,HIGH*1.02,18),COLORYELLOW;HJ_93:=CLOSE<REF(CLOSE,4);HJ_94:=BARSLASTCOUNT(HJ_93);HJ_95:=HJ_94=18;HJ_96:=ISLASTBAR AND BETWEEN(HJ_94,1,17);HJ_97:=(BACKSET(HJ_95>0,18) OR BACKSET(HJ_96>0,HJ_94))*HJ_94; DRAWNUMBER(HJ_97>0,LOW*0.98,HJ_97),COLORMAGENTA;DRAWNUMBER(HJ_94=9,LOW*0.98,9),COLORGREEN;DRAWNUMBER(HJ_94=13,LOW*0.98,13),COLORYELLOW;DRAWNUMBER(HJ_94=18,LOW*0.98,18),COLORYELLOW;DRAWKLINE(HIGH,OPEN,LOW,CLOSE);HJ_98:=IF(HJ_51=1,HIGH=HHV(HIGH,60),0);HJ_99:=IF(HJ_51=1,LOW=LLV(LOW,60),0);HJ_100:=BARSLAST(HJ_98);HJ_101:=BARSLAST(HJ_99);HJ_102:=BACKSET(ISLASTBAR,HJ_100+1);HJ_103:=BACKSET(ISLASTBAR,HJ_101+1);HJ_104:=BARSSINCE(HJ_102)+1;HJ_105:=BARSSINCE(HJ_103)+1;HJ_106:=IF(BACKSET(HJ_102,HJ_104+1),1,DRAWNULL);HJ_107:=IF(BACKSET(HJ_103,HJ_105+1),1,DRAWNULL);HJ_108:=HJ_107*SUM(HIGH*VOL,HJ_105)/SUM(VOL,HJ_105);HJ_109:=HJ_106*SUM(LOW*VOL,HJ_104)/SUM(VOL,HJ_104);HJ_110:=HJ_107*SUM(LOW*VOL,HJ_105)/SUM(VOL,HJ_105);HJ_111:=HJ_106*SUM(HIGH*VOL,HJ_104)/SUM(VOL,HJ_104);NOTEXT点金_支:IF(REF(HIGH,HJ_104)>REF(HIGH,HJ_104+1) AND REF(HIGH,HJ_104)>REF(HIGH,HJ_104-1),HJ_108,HJ_109),COLOR00FF7F;NOTEXT点金_支1:IF(REF(HIGH,HJ_104)>REF(HIGH,HJ_104+1) AND REF(HIGH,HJ_104)>REF(HIGH,HJ_104-1),HJ_110,HJ_111),COLORGREEN,LINETHICK2; NOTEXT点金_压:IF(REF(HIGH,HJ_105)>REF(HIGH,HJ_105+1) AND REF(HIGH,HJ_105)>REF(HIGH,HJ_105-1),HJ_109,HJ_108),COLORLIMAGENTA; NOTEXT点金_压1:IF(REF(HIGH,HJ_105)>REF(HIGH,HJ_105+1) AND REF(HIGH,HJ_105)>REF(HIGH,HJ_105-1),HJ_111,HJ_110),COLORRED,LINETHICK2; DRAWNUMBER(ISLASTBAR,NOTEXT点金_压*1,CONST(NOTEXT点金_压)),COLORRED; DRAWNUMBER(ISLASTBAR,NOTEXT点金_支*1,CONST(NOTEXT点金_支)),COLORGREEN; DRAWNUMBER(ISLASTBAR,NOTEXT点金_压1*1,CONST(NOTEXT点金_压1)),COLORLIMAGENTA;DRAWNUMBER(ISLASTBAR,NOTEXT点金_支1*1,CONST(NOTEXT点金_支1)),COLOR00FF7F;。
通达信黄金分割线主图公式源码(实用)
通达信黄金分割线主图公式源码(实用){黄金分割}N:=34;{你随意调整N的参数,看看效果如何:你可以发现更多级别的阻力和支撑点}高:IF (HIGH>PEAK(1,N,1),HHV(HIGH,N),PEAK(1,N,1)),COLORGREEN;{最高价}低:IF (LOW<TROUGH(2,N,1),LLV(LOW,N),TROUGH(2,N,1)),COLORMAG ENTA;{最低价}F0.191:(高-低)*0.191+低,DOTLINE,COLORMAGENTA;F0.382:(高-低)*0.382+低,DOTLINE,COLORCYAN;F0.500:(高-低)*0.500+低,DOTLINE,COLORWHITE;F0.618:(高-低)*0.618+低,DOTLINE,COLORCYAN;F0.809:(高-低)*0.809+低,DOTLINE,COLORYELLOW;{黄金分割点位}波谷↑:=TROUGHBARS(2,N,1);{波谷起涨位}波峰↓:=PEAKBARS(1,N,1);{波峰起跌位}ZHSJ:=IF(波峰↓<波谷↑,BACKSET(ISLASTBAR,波峰↓),IF(波谷↑<波峰↓,BACKSET(ISLASTBAR,波谷↑),0));DRAWTEXT(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),高*1.003,'重要阻力')COLORGREEN;DRAWTEXT(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),F0.191*1.003,' 80.9%'),COLORYELLOW;DRAWTEXT(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),F0.382*1.003,' 61.8%'),COLORCYAN;DRAWTEXT(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),F0.500*1.003,' 50.0%'),COLORWHITE;DRAWTEXT(波峰↓<波谷↑ ANDDRAWTEXT(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),F0.809*1.003,' 19.1%'),COLORRED;DRAWTEXT(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),低*1.003,' 近期低点')COLORRED;DRAWNUMBER(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),高,高)COLORGREEN;DRAWNUMBER(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),F0.809,F0.809)COLORMAGENTA;DRAWNUMBER(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),F0.618,F0.618)COLORCYAN;DRAWNUMBER(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),F0.500,F0.500)COLORWHITE;DRAWNUMBER(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),F0.382,F0.382)COLORCYAN;DRAWNUMBER(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),F0.191,F0.191)COLORYELLOW;DRAWNUMBER(波峰↓<波谷↑ AND CROSS(ZHSJ,0.1),低,低)COLORRED;DRAWTEXT(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),高*1.003,' 重要阻力')COLORGREEN;DRAWTEXT(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),F0.191*1.003,' 19.1%'),COLORRED;DRAWTEXT(波峰↓>波谷↑ AN D CROSS(ZHSJ,0.1),F0.382*1.003,' 38.2%'),COLORGREEN;DRAWTEXT(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),F0.500*1.003,' 50.0%'),COLORWHITE;DRAWTEXT(波峰↓>波谷↑ ANDDRAWTEXT(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),F0.809*1.003,' 80.9%'),COLORYELLOW;DRAWTEXT(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),低*1.003,' 近期低点')COLORRED;DRAWNUMBER(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),高,高)COLORGREEN;DRAWNUMBER(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),F0.809,F0.809)COLORYELLOW;DRAWNUMBER(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),F0.618,F0.618)COLORCYAN;DRAWNUMBER(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),F0.500,F0.500)COLORWHITE;DRAWNUMBER(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),F0.382,F0.382)COLORCYAN;DRAWNUMBER(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),F0.191,F0.191)COLORMAGENTA;DRAWNUMBER(波峰↓>波谷↑ AND CROSS(ZHSJ,0.1),低,低)COLORRED;MA21:MA(CLOSE,21)COLORLIMAGENTA,CROSSDOT;{布林中轨}IF(MA21<REF(MA21,5),MA21,DRAWNULL)COLORCYAN,CRO SSDOT;。
通达信指标公式源码均线画线黄金分割指标
自动C:=INDEXC;自动H:=INDEXH;自动L:=INDEXL;自动O:=INDEXO;大盘低:=CONST(LLV(自动L,叠加行指));大盘高:=CONST(HHV(自动H,叠加行指));大盘差:=大盘高-大盘低;当前低:=CONST(LLV(L,叠加行指));当前高:=CONST(HHV(H,叠加行指));当前差:=当前高-当前低;比:=当前差/大盘差;大盘:当前低+(自动C-大盘低)*比,NODRAW; 变H:=当前低+(自动H-大盘低)*比;变L:=当前低+(自动L-大盘低)*比;变O:=当前低+(自动O-大盘低)*比;自动HYC:=HY_INDEXC;自动HYH:=HY_INDEXH;自动HYL:=HY_INDEXL;自动HYO:=HY_INDEXO;大盘低HY:=CONST(LLV(自动HYL,叠加行指)); 大盘高HY:=CONST(HHV(自动HYH,叠加行指)); 大盘差HY:=大盘高HY-大盘低HY;当前低HY:=CONST(LLV(L,叠加行指));当前高HY:=CONST(HHV(H,叠加行指));当前差HY:=当前高HY-当前低HY;比HY:=当前差HY/大盘差HY;行业:当前低HY+(自动HYC-大盘低HY)*比HY,NODRAW;变HYH:=当前低HY+(自动HYH-大盘低HY)*比HY;变HYL:=当前低HY+(自动HYL-大盘低HY)*比HY;变HYO:=当前低HY+(自动HYO-大盘低HY)*比HY;STICKLINE(CURRBARSCOUNT<=叠加行指,变H,变L,0,0),COLOR888888;STICKLINE(CURRBARSCOUNT<=叠加行指,变O,大盘,2,0),COLOR888888;STICKLINE(CURRBARSCOUNT<=叠加行指AND 大盘>=变O,变O,大盘,2,1),COLORAAAAAA; STICKLINE(CURRBARSCOUNT<=叠加行指,变HYH,变HYL,0,0),COLORYELLOW;STICKLINE(CURRBARSCOUNT<=叠加行指,变HYO,行业,2,0),COLORYELLOW;STICKLINE(CURRBARSCOUNT<=叠加行指AND 行业>=变HYO,变HYO,行业,2,1),COLORYELLOW; MA1:MA(CLOSE,M1)COLORWHITE;MA2:MA(CLOSE,M2)COLORYELLOW;MA3:MA(CLOSE,M3)COLORMAGENTA;MA4:MA(CLOSE,M4)COLORLIBLUE;MA5:MA(CLOSE,M5)COLORCYAN;昨天MA1:=REF(MA1,1);昨天MA2:=REF(MA2,1);昨天MA3:=REF(MA3,1);昨天MA4:=REF(MA4,1);昨天MA5:=REF(MA5,1);M1向上:=BARSLASTCOUNT(MA1>REF(MA1,1));M2向上:=BARSLASTCOUNT(MA2>REF(MA2,1));M3向上:=BARSLASTCOUNT(MA3>REF(MA3,1));M4向上:=BARSLASTCOUNT(MA4>REF(MA4,1));M5向上:=BARSLASTCOUNT(MA5>REF(MA5,1));SA:=MAX(MAX(MA1,MA2),MAX(MA3,MA4));SB:=MIN(MIN(MA1,MA2),MIN(MA3,MA4));JD1:=MAX(MAX(MA(C,M1),MA(C,M2)),MA(C,M3));JX1:=MIN(MIN(MA(C,M1),MA(C,M2)),MA(C,M3));多头N:=(昨天MA1>=昨天MA2 AND 昨天MA2>=昨天MA3 AND 昨天MA3>=昨天MA4 AND 昨天MA4>=昨天MA5);向上N:=(MA1>昨天MA1 AND MA2>昨天MA2 AND MA3>昨天MA3 AND MA4>昨天MA4 AND MA5>昨天MA5);多头:BARSLASTCOUNT(多头N>0)COLORWHITE,NODRAW;向上:BARSLASTCOUNT(向上N>0)COLORWHITE,NODRAW;五线顺上N:=多头>0 AND 向上>0;一阳三线:(JX1/JD1*100>98.5 AND C>JD1 AND O<JX1 AND REF(MA(C,M3),1)/MA(C,M3)<1 AND C>MA(C,M5))COLORLIRED,NODRAW;四线粘合:100*(SA-SB)/SB,COLORYELLOW,NODRAW;N线顺上:BARSLASTCOUNT(五线顺上N>0)COLORMAGENTA,NODRAW;DRAWTEXT(一阳三线=1,L,' 一阳'),COLORLIRED;显示:=黄金分割*1000-1000;DRAWRECTREL(显示, 1,1000,1,RGB(94,38,18));{顶} DRAWRECTREL(显示,189,1000,189,RGB(94,38,18));{八零九} DRAWRECTREL(显示,374,1000,374,RGB(94,38,18));{六一八} DRAWRECTREL(显示,495,1000,495,RGB(94,0,0));{半分位} DRAWRECTREL(显示,610,1000,610,RGB(94,38,18));{三八二} DRAWRECTREL(显示,807,1000,807,RGB(94,38,18));{一九一} DRAWRECTREL(显示,999,1000,1000,RGB(94,38,18));{底}{上轨趋势线}WA1:=(REF(H,上轨+1)=HHV(H,上轨+1+1))*趋势开关;WB1:=FILTER(WA1,上轨+1);WC1:=BACKSET(WB1,上轨+1+1); {高}WD1:=FILTER(WC1,上轨+1);{高点}WT0:=BACKSET(ISLASTBAR,BARSLAST(WC1)+1);WU0:=WT0>REF(WT0,1); {前高}WR1:=BACKSET(ISLASTBAR,BARSLAST(WD1)+1);WS1:=WR1>REF(WR1,1); {前一高}WR2:=BACKSET(WS1,REF(BARSLAST(WD1),1)+2);WS2:=WR2>REF(WR2,1); {前二高}WR3:=BACKSET(WS2,REF(BARSLAST(WD1),1)+2);WS3:=WR3>REF(WR3,1); {前三高}压力1:DRAWLINE(WS1,H,WC1,H,1)COLOR004000;压力2:DRAWLINE(WS2,H,WS1,H,1)COLOR004000;压力3:DRAWLINE(WS3,H,WS2,H,1)COLOR004000,LINETHICK2; 高:=REF(L,BARSLAST(WU0))COLOR808080,DOTLINE;高1:REF(H,BARSLAST(WS1))COLOR808080,DOTLINE;高2:REF(H,BARSLAST(WS2))COLOR808080,DOTLINE;高3:=REF(H,BARSLAST(WS3))COLOR808080,DOTLINE;{下轨趋势线}WA2:=(REF(L,下轨+1)=LLV(L,下轨+1+1))*趋势开关;WB2:=FILTER(WA2,下轨+1);WC2:=BACKSET(WB2,下轨+1+1);{低}WD2:=FILTER(WC2,下轨+1);{低点}WT:=BACKSET(ISLASTBAR,BARSLAST(WC2)+1);WU:=WT>REF(WT,1); {前低}WT1:=BACKSET(ISLASTBAR,BARSLAST(WD2)+1);WU1:=WT1>REF(WT1,1); {前一低}WT2:=BACKSET(WU1,REF(BARSLAST(WD2),1)+2);WU2:=WT2>REF(WT2,1); {前二低}WT3:=BACKSET(WU2,REF(BARSLAST(WD2),1)+3);WU3:=WT3>REF(WT3,1); {前三低}下轨3:DRAWLINE(WU1,L,WC2,L,1)COLORLIRED,LINETHICK2; 下轨2:DRAWLINE(WU2,L,WU1,L,1)COLOR0080FF,LINETHICK2;下轨1:DRAWLINE(WU3,L,WU2,L,1)COLOR0080FF,LINETHICK2;低:=REF(L,BARSLAST(WU))COLOR808080,DOTLINE;低1:REF(L,BARSLAST(WU1))COLOR808080,DOTLINE;低2:REF(L,BARSLAST(WU2))COLOR808080,DOTLINE;低3:=REF(L,BARSLAST(WU3))COLOR808080,DOTLINE;{上轨信号}向下:=BARSLASTCOUNT(高3>高2);向上K:=BARSLASTCOUNT(高3<高2);DRAWTEXT(向下=1,H,'向下'),COLORLIGREEN;DRAWTEXT(向上K=1,H,'向上'),COLORLIGREEN;下跌:=BARSLASTCOUNT(高3>高2 AND 高2>高1 AND 低2>低1);DRAWTEXT(下跌=1,H,'下跌'),COLORLIGREEN;回落:=BARSLASTCOUNT(高3<高2 AND 高2>高1 AND 低2>低1);DRAWTEXT(回落=1,H,'回落'),COLORLIGREEN;加速跌:=BARSLASTCOUNT(高3>高2 AND 高2>高1 AND 高1>高AND 压力1<压力2);{正轨信号}上升:=BARSLASTCOUNT(低2>低3);下降:=BARSLASTCOUNT(低2<低3);DRAWTEXT(上升=1,L,'上升'),COLORMAGENTA;DRAWTEXT(下降=1,L,'下降'),COLORGREEN;转强:=BARSLASTCOUNT(低2<低1);转弱:=BARSLASTCOUNT(低2>低1);DRAWTEXT(转强=1,L,'转强'),COLORMAGENTA;DRAWTEXT(转弱=1,L,'转弱'),COLORGREEN;KQW:=CONST(C);加速上:=BARSLASTCOUNT(低>低1);加速涨:BARSLAST(加速上=1 AND KQW>下轨3 AND 下轨3>下轨2 AND 下轨2>REF(下轨2,1) AND 高1<高2),COLORYELLOW,NODRAW;反弹:=BARSLASTCOUNT(低3>低2 AND 低2>低1 AND 低1<低);STICKLINE(CLOSE>=OPEN,CLOSE,HIGH,0,0), COLORRED;STICKLINE(CLOSE>=OPEN,OPEN,LOW,0,0), COLORRED;STICKLINE(CLOSE<OPEN,OPEN,HIGH,0,0), COLOR00EC00;STICKLINE(CLOSE<OPEN,CLOSE,LOW,0,0), COLOR00EC00;STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,2.9.2,0),COLOR0000A1;STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,1.9.2,0),COLOR0000B5;STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,0.9.8,0),COLOR0000C5;STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,0.4,0),COLOR0000D4;STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,0.2,0),COLOR0000FF;STICKLINE(CLOSE<OPEN,CLOSE,OPEN,2.9.2,0),COLOR009000;STICKLINE(CLOSE<OPEN,CLOSE,OPEN,1.9.2,0),COLOR00B400;STICKLINE(CLOSE<OPEN,CLOSE,OPEN,0.9.8,0),COLOR00C100;STICKLINE(CLOSE<OPEN,CLOSE,OPEN,0.4,0),COLOR00DB00;STICKLINE(CLOSE<OPEN,CLOSE,OPEN,0.2,0),COLOR00EC00;涨停:=(CLOSE/REF(C,1)>=1.09)AND C=H;STICKLINE(涨停,L,H,0,0),COLORYELLOW;STICKLINE(涨停,CLOSE,OPEN,2.9.2,0),COLOR00AAFF;STICKLINE(涨停,CLOSE,OPEN,1.9.2,0),COLOR00CCFF;STICKLINE(涨停,CLOSE,OPEN,0.9.8,0),COLOR00FFFF;跌停:=(C/REF(C,1)<=0.91)AND C=L;STICKLINE(跌停,L,H,0,0),COLORGREEN;STICKLINE(跌停,CLOSE,OPEN,2.9.2,0),COLOR009000;STICKLINE(跌停,CLOSE,OPEN,1.9.2,0),COLOR00B400;STICKLINE(跌停,CLOSE,OPEN,0.9.8,0),COLOR00C100;DRAWTEXT(加速涨,L,'加速涨')COLORYELLOW;DRAWTEXT(反弹=1,L,'反弹'),COLORYELLOW;DRAWTEXT(加速跌=1,H,'加速跌'),COLORLIGREEN;DRAWTEXT_FIX(CURRBARSCOUNT=黄金分割,0.0,0.160,0,'80.9%')COLOR0000F7; DRAWTEXT_FIX(CURRBARSCOUNT=黄金分割,0.0,0.345,0,'61.8%')COLOR0000F7; DRAWTEXT_FIX(CURRBARSCOUNT=黄金分割,0.0,0.465,0,' 50%')COLORYELLOW; DRAWTEXT_FIX(CURRBARSCOUNT=黄金分割,0.0,0.580,0,'38.2%')COLOR0000F7; DRAWTEXT_FIX(CURRBARSCOUNT=黄金分割,0.0,0.780,0,'19.1%')COLOR0000F7;。
通达信指标公式源码黄金分割+单阳不破+黄金均线主图(源码 主图)
用法:1.黄金分割线结合均线判断支持和压力,均线为5日8日和55日144日。
短线60分钟来分析判断买卖。
2.选股尽量选在55日和144日均线以上的票,利用单阳不破,选缩量回调到黄金分割和这2条均线支持时买入,获利概率较大。
N的参数:N 10 10000 150源码如下:MA5:MA(C,5);MA10:MA(C,8),LINETHICK1,COLORYELLOW ;MA55:MA(C,55),LINETHICK3,COLORLIMAGENTA;MA144:MA(C,144),LINETHICK2,COLORGREEN;高1:=HHV(H,N);低1:=LLV(L,N);H1:=高1-(高1-低1)*0.191;H2:=高1-(高1-低1)*0.382;H3:=高1-(高1-低1)*0.5;H4:=高1-(高1-低1)*0.618;H5:=高1-(高1-低1)*0.809;高:REFDATE(高1,DATE);低:REFDATE(低1,DATE);一:REFDATE(H1,DATE);二:REFDATE(H2,DATE);{涨停标注}STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORYELLOW;{财务数据}DRAWTEXT_FIX(ISLASTBAR,0.18,0.01,1,'上市日期:'),COLOR00FF00; DRAWNUMBER_FIX(ISLASTBAR,0.18,0.01,0,FINANCE(42)),COLOR00FF00; DRAWTEXT_FIX(1,0.01,0.13,0,EXTERNSTR(0,1)),COLORRED; DRAWTEXT_FIX(1,0.26,0.01,0,EXTERNSTR(0,2)),COLORDD00DD; DRAWTEXT_FIX(1,0.01,0.066,0,EXTERNSTR(0,3)),COLOR00DD00; DRAWTEXT_FIX(ISLASTBAR ,0.06,0.01,1,DYBLOCK),COLORYELLOW;DRAWTEXT_FIX(ISLASTBAR ,0.065,0.01,0,HYBLOCK),COLORYELLOW;三:REFDATE(H3,DATE);四:REFDATE(H4,DATE),COLORRED;五:REFDATE(H5,DATE);{DRAWTEXT(CURRBARSCOUNT=1.00,一,'一(0.191)'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=1.00,二,'二(0.382)'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=1.00,三,'三(0.50)'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=1.00,四,'四(0.618'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=1.00,五,'五(0.809)'),COLORYELLOW; DRAWTEXT(CURRBARSCOUNT=1.00,高,'高'),COLORYELLOW;DRAWTEXT(CURRBARSCOUNT=1.00,低,'低'),COLORYELLOW; DRAWKLINE(H,O,L,C);};盘整天数:=5;{盘整天数自己调,以5--7日为最佳}下探幅度:=5;上冲幅度:=25;涨停:=(C-REF(C,1))/REF(C,1)>0.09;{涨幅大于9个点}缩量:=HHV(VOL,盘整天数-2)<REF(VOL,盘整天数-1) AND SUM(VOL, 盘整天数)>2* SUM(VOL, 盘整天数-2);七伤拳:=缩量AND REF(涨停,盘整天数) AND COUNT(涨停,盘整天数+1)=1 AND (HHV(H,盘整天数)-REF(C,盘整天数))/REF(C,盘整天数)*100<上冲幅度AND (LLV(L,盘整天数)-REF(C,盘整天数))/REF(C,盘整天数)*100>(下探幅度*-1);DRAWTEXT(七伤拳,LOW*0.98,'七伤拳'),COLORRED;阳涨幅:=3.5;阳倍量:=1.9;单阳收:=C;单阳开:=O;单阳:=单阳收>=REF(C,1)*(1+阳涨幅/100)AND VOL>REF(VOL,1)*阳倍量; DRAWTEXT(CURRBARSCOUNT<100 AND 单阳,L*0.98,'阳'),COLOR00FFFF;高不破价:=REF(C,BARSLAST(单阳));低不破价:=REF(L,BARSLAST(单阳));单阳不破:=CURRBARSCOUNT<100 AND BARSLAST(单阳)<11 AND(LLV(L,BARSLAST(单阳))>低不破价OR LLV(L,BARSLAST(单阳))=低不破价); STICKLINE(单阳不破,低不破价-低不破价*0.0005,低不破价,4,0),COLORGREEN; STICKLINE(单阳不破,高不破价,高不破价,4,0),COLORRED;STICKLINE(单阳,单阳开,单阳收,2,0),COLORYELLOW;DRAWTEXT(BARSLAST(单阳)=1 AND 单阳不破,低不破价*0.98,'1'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=2 AND 单阳不破,低不破价*0.98,'2'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=3 AND 单阳不破,低不破价*0.98,'3'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=4 AND 单阳不破,低不破价*0.98,'4'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=5 AND 单阳不破,低不破价*0.98,'5'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=6 AND 单阳不破,低不破价*0.98,'6'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=7 AND 单阳不破,低不破价*0.98,'7'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=8 AND 单阳不破,低不破价*0.98,'8'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=9 AND 单阳不破,低不破价*0.98,'9'),COLORGREEN;DRAWTEXT(BARSLAST(单阳)=10 AND 单阳不破,低不破价*0.98,'10'),COLORGREEN;。
通达信黄金比例主图指标公式
通达信黄金比例主图指标公式通达信黄金比例主图指标公式MA5:EMA(C,5),COLOR00FF00,DOTLINE;IF(MA5>REF(MA5,1),MA5,DRAWNULL),COLOR0077FF,LINET HICK3;DIF1:=WMA(CLOSE,5);DIF2:=WMA(CLOSE,13);MACD:WMA((3*DIF1-2*DIF2),2),COLORFF9900,DOTLINE;IF(MACD>REF(MACD,1),MACD,DRAWNULL),COLORRED,LINE THICK3;BC1E:=IF(L=LLV(L,8*20),L,DRAWNULL);BC2E:=CONST(BARSLAST(BC1E=L))+1;E:=CONST(IF(BC2E=1,L,REF(L,BC2E-1)));DIFFK:=DIF1-DIF2;DEAK:=WMA(DIFFK,8);MACDK:=2*(DIFFK-DEAK);STICKLINE(MACDK>0 AND MACDK>REF(MACDK,1),E+MACDK,E,2,0),COLOR0000FF;STICKLINE(MACDK>0 AND MACDK<REF(MACDK,1),E+MACDK,E,2,0),COLORFF9900;STICKLINE(MACDK<0,E+MACDK,E,2,0),COLORFF9900;{高抛.低吸}SJ:=WMA((C-LLV(L,5))/(HHV(H,5)-LLV(L,5))*100,2);ZJ:=WMA(0.667*REF(SJ,1)+0.333*SJ,2);DRAWTEXT(CROSS(SJ,ZJ) AND SJ<30,L-0.05,'←低吸'),COLOR00FF99,LINETHICK2;DRAWTEXT(CROSS(ZJ,SJ) AND SJ>70,H+0.05,'←高抛'),COLOR0044FF,LINETHICK2;TC1:=IF(H=HHV(H,8*14),H,DRAWNULL);TC2:=CONST(BARSLAST(TC1=H))+1;UPPER:=CONST(IF(TC2=1,H,REF(H,TC2-1)));BC1:=IF(L=LLV(L,8*20),L,DRAWNULL);BC2:=CONST(BARSLAST(BC1=L))+1;LOWER:=CONST(IF(BC2=1,L,REF(L,BC2-1)));LP:=CURRBARSCOUNT<=BC2 AND L=LOWER;{低点定位}HP:=CURRBARSCOUNT<=TC2 AND H=UPPER;{高点定位};STICKLINE(LP,L*0.992,L,13,0),COLORFF00FF;STICKLINE(HP,H,H*1.005,13,0),COLOR00FF00;X1:IF(CURRBARSCOUNT<=MAX(BC2,TC2),UPPER,DRAWNUL L),COLOR89615F;X2:IF(CURRBARSCOUNT<=MAX(BC2,TC2),LOWER,DRAWNU LL),COLOR89615F;X3:IF(CURRBARSCOUNT<=MAX(BC2,TC2),IF(BC2>TC2,UPPE R-(UPPER-LOWER)*0.146,LOWER+(UPPER-LOWER)*0.146),DRAWNULL),COLOR89615F;X4:IF(CURRBARSCOUNT<=MAX(BC2,TC2),IF(BC2>TC2,UPPE R-(UPPER-LOWER)*0.191,LOWER+(UPPER-LOWER)*0.191),DRAWNULL),COLOR89615F;X5:IF(CURRBARSCOUNT<=MAX(BC2,TC2),IF(BC2>TC2,UPPE R-(UPPER-LOWER)*0.236,LOWER+(UPPER-LOWER)*0.236),DRAWNULL),COLOR89615F;X6:IF(CURRBARSCOUNT<=MAX(BC2,TC2),IF(BC2>TC2,UPPE R-(UPPER-LOWER)*0.382,LOWER+(UPPER-LOWER)*0.382),DRAWNULL),COLOR89615F;X7:IF(CURRBARSCOUNT<=MAX(BC2,TC2),IF(BC2>TC2,UPPE R-(UPPER-LOWER)*0.5,LOWER+(UPPER-LOWER)*0.5),DRAWNULL),COLOR89615F;X8:IF(CURRBARSCOUNT<=MAX(BC2,TC2),IF(BC2>TC2,UPPE R-(UPPER-LOWER)*0.618,LOWER+(UPPER-LOWER)*0.618),DRAWNULL),COLOR89615F;X9:IF(CURRBARSCOUNT<=MAX(BC2,TC2),IF(BC2>TC2,UPPE R-(UPPER-LOWER)*0.764,LOWER+(UPPER-LOWER)*0.764),DRAWNULL),COLOR89615F;X10:IF(CURRBARSCOUNT<=MAX(BC2,TC2),IF(BC2>TC2,UPP ER-(UPPER-LOWER)*0.809,LOWER+(UPPER-LOWER)*0.809),DRAWNULL),COLOR89615F;DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2)+8,X1,'UPPER ');DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2)+8,X2,'LOWE R');DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2)+8,X3,'0.146');DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2)+8,X4,'0.191');DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2)+8,X5,'0.236');DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2)+8,X6,'0.382');DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2)+8,X7,'0.5');DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2)+8,X8,'0.618');DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2)+8,X9,'0.764');DRAWTEXT(CURRBARSCOUNT=MIN(BC2,TC2)+8,X10,'0.809 ');STICKLINE(CLOSE>=REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORRED;STICKLINE(CLOSE>=REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR000066;STICKLINE(CLOSE>=REF(CLOSE,1) ,OPEN,CLOSE,2.6,0 ),COLOR000099;STICKLINE(CLOSE>=REF(CLOSE,1) ,OPEN,CLOSE,2,0 ),COLOR0000CC;STICKLINE(CLOSE>=REF(CLOSE,1) ,OPEN,CLOSE,1.2,0 ),COLOR0000FF;STICKLINE(CLOSE>=REF(CLOSE,1) ,OPEN,CLOSE,0.4,0 ),COLORCC66FF;STICKLINE(CLOSE<REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORCYAN;STICKLINE(CLOSE<REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLORCC0000;STICKLINE(CLOSE<REF(CLOSE,1) ,OPEN,CLOSE,2.6,0 ),COLORFF4400;STICKLINE(CLOSE<REF(CLOSE,1) ,OPEN,CLOSE,2,0 ),COLORFF8800;STICKLINE(CLOSE<REF(CLOSE,1) ,OPEN,CLOSE,1.2,0 ),COLORFFCC00;STICKLINE(CLOSE<REF(CLOSE,1) ,OPEN,CLOSE,0.4,0 ),COLORCYAN;。
通达信指标公式源码 物极必反 黄金坑
{黄金坑}REFLINE: -15, {0}, {20}, {40}, {60};VAR1:=MA(WINNER(CLOSE),9)*100;买!: CROSS(VAR1,2)*30,COLOR0000FF ,LINETHICK3 ;VAR2:=(1-EMA((HHV(HIGH,15)-CLOSE)/(HHV(HIGH,15)-LLV(LOW,15)),15))* 100;VAR3:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;VAR4:=SMA(VAR3,9,1);VAR5:=SMA(VAR4,9,1);VAR6:=(CLOSE-SMA(CLOSE,13,1))/SMA(CLOSE,13,1)*(-100);VAR7:=REF(VAR6,1)>13 AND REF(VAR6,1)/VAR6>1.23 ANDCLOSE/REF(CLOSE,1)>1.03;春笋: IF(VAR7 ANDREF(CLOSE,1)<=COST(5),20,0),LINESTICK ,COLOR00FF00,LINETHICK2; VAR8:=MA(CLOSE,27);VAR9:=(CLOSE-VAR8)/VAR8*100;VARA:=MA(VAR9,2);VARB:=BARSLAST(CROSS(-10,VARA)=1);VARC:=BARSLAST(CROSS(VARA,10)=1);VARD:=VARA<-10 AND VARB>3;VARE:=VARA>10 AND VARC>3;黄金坑: IF(VARD,VARA,0),LINESTICK ,LINETHICK2, COLORYELLOW;财神到: IF(VARE,VARA,0),LINESTICK , COLORGREEN;贪嘴乐: IF(VARA>REF(VARA,1) AND VARD ANDVARA<-15,30,0),LINETHICK2,LINESTICK,COLORFFA2AF;DRAWICON(贪嘴乐>0,40,1);VARF:=REF(LOW,1)*0.9;VAR10:=LOW*0.9;VAR11:=(VAR10*VOL+VARF*(CAPITAL-VOL))/CAPITAL;VAR12:=EMA(VAR11,30);VAR13:=CLOSE-REF(CLOSE,1);VAR14:=MAX(VAR13,0);VAR15:=ABS(VAR13);VAR16:=SMA(VAR14,7,1)/SMA(VAR15,7,1)*100;VAR17:=SMA(VAR14,13,1)/SMA(VAR15,13,1)*100;VAR18:=BARSCOUNT(CLOSE);VAR19:=SMA(MAX(VAR13,0),6,1)/SMA(ABS(VAR13),6,1)*100;VAR1A:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100; VAR1B:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;VAR1C:=SMA((SMA(VAR1B,4,1)-50)*2,3,1);VAR1D:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100; VAR1E:=SMA(VAR1D,4,1);VAR1F:=SMA(VAR1E,3,1);VAR20:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;VAR21:=VAR19<=25 AND VAR1A<-95 AND VAR20>20 AND VAR1C<-30 AND VAR1F<30 AND VAR12-CLOSE>=-0.25 AND VAR16<22 AND VAR17<28 AND VAR18>50;血战超跌: STICKLINE(VAR21,0,60,5,0);{黄金坑选股}VAR1:=MA(CLOSE,27);VAR2:=(CLOSE-VAR1)/VAR1*100;VARA:=MA(VAR2,2);VARB:=BARSLAST(CROSS(-10,VARA)=1);VARC:=BARSLAST(CROSS(VARA,10)=1);VARD:=VARA<-10 AND VARB>3;VARE:=VARA>10 AND VARC>3;黄金坑:=IF(VARD,VARA,0);黄金:=REF(黄金坑,1)<0;黄金坑消失:黄金AND 黄金坑=0;{改进版物极必反}物极必反:(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34))*100,COLORMAGE NTA,POINTDOT,LINETHICK4;风险:=IF(物极必反<5,物极必反+90,120);DRAWBAND(120,RGB(0,180,180),风险,RGB(0,180,180));底部:=IF(物极必反>95,物极必反-10,0);DRAWBAND(底部,RGB(250,0,00),0,RGB(250,0,00));VAR1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;VAR2:=EMA(VAR1,30);VAR3:=EMA(VAR2,30);VAR4:=3*VAR2-2*VAR3;势:EMA(VAR4,5),COLORBLUE,LINETHICK3;VAR5:=LLV(LOW,10);VAR6:=HHV(HIGH,25);决策线:EMA((CLOSE-VAR5)/(VAR6-VAR5)*100,4),COLORRED,LINETHICK2; DRAWTEXT(CROSS(80,决策线),75,'小心')COLORWHITE;五十:50,POINTDOT,COLORYELLOW;十:10,COLORYELLOW;八十:80;STICKLINE(势>80,势,80,1,0),COLORGREEN;STICKLINE(势<10,势,10,1,0),COLORWHITE;DRAWTEXT(CROSS(10,势),69,'进→'),COLORYELLOW;DRAWTEXT(CROSS(10,势),58,'入'),COLORFF00FF;DRAWTEXT(CROSS(10,势),43,'异'),COLOR00C0FF;DRAWTEXT(CROSS(10,势),31,'动[↓]'),COLORB47DFF;DRAWTEXT(CROSS(10,势),19,'区'),COLORFFFF6F;。
通达信指标公式源码 BOLL-金
【BOLL-金】副图.是个相同于布林线类型的公式.但是公式的元素大不相同.新同学马上就会明显看出买卖点.我们炒股就是为的找一个合适的买卖位置.尽可能使利润最大化.其实小散第一就【怕套】.第二就怕【挂在半山腰】.这个公式基本是能够明确显示买卖点.十次成功七次.这个公式就可以使用.不过信不信由你.公式的信号仅仅是提醒而已.真的买卖股票还是你说了算.【注意】---------------你的【通达信版本】必需能够用函数WMA. 和DRAWGBK(O>C,RGB(40,0,40),RGB(0,50,40),0,'01',0);否侧你就得提高你的版本--------公式源码下:---------------------------------------------{BOLL-金F}DRAWGBK(O>C,RGB(40,0,40),RGB(0,50,40),0,'01',0);{1.重心线}HH:=HHV(H,3);LL:=LLV(L,3);ZXC:=WMA((2*C+HH+LL)/4,4);ZXO:=REF(ZXC,1);ZXC,COLOR00FF00,LINETHICK2;IF(ZXC>REF(ZXC,1),ZXC,DRAWNULL),COLORRED,LINETHICK3;{2.重心K线--------可以加减大括弧-------}STICKLINE(ZXO>=ZXC,ZXO,ZXC,3,0 ),COLOR003300;STICKLINE(ZXO>=ZXC,ZXO,ZXC,2,0 ),COLOR005500;STICKLINE(ZXO>=ZXC,ZXO,ZXC,1,0 ),COLOR007700;STICKLINE(ZXO>=ZXC,ZXO,ZXC,0.5,0 ),COLOR009900;STICKLINE(ZXO<ZXC,ZXO,ZXC,3,0 ),COLOR0099FF;STICKLINE(ZXO<ZXC,ZXO,ZXC,2,0 ),COLOR0077FF;STICKLINE(ZXO<ZXC,ZXO,ZXC,1,0 ),COLOR0055FF;STICKLINE(ZXO<ZXC,ZXO,ZXC,0.5,0 ),COLOR0033FF;{3.BOLL-金}MID:MA(ZXC,18),COLOR00FFFF,DOTLINE;UPPER:MID + 1.8*STD(ZXC,18),COLORFF66FF;LOWER:MID - 1.8*STD(ZXC,18),COLORFF9900;{4.高抛.低吸}RC:=(H+L+C*2)/4;R2D:=WMA(RC,27);R2E:=STD(RC,27);R3F:=(RC-R2D)/R2E*100;R40:=WMA(R3F,3);R41:=WMA(R40,3);JD:=WMA(R41,2);AJ:=3*R41-2*JD;DRAWTEXT(CROSS(AJ,JD) ,L-0.2,'←买呗'),COLOR00FFFF,LINETHICK2; DRAWTEXT(CROSS(JD,AJ) ,H+0.2,'←跑哇'),COLOR00FFFF,LINETHICK2;。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
黄金法则:————————————————————————;本公式与撑压线为一母双胎指标;都是以缠论高点母本;本指标是撑压线的简化指标;与撑压线不同的是:1.去掉撑压线划线指标;2.增加单阳测顶与单阴测底;————————————————————————;本指标包含以下五大功能(废除两项):————————————————————————;一:黄金分割(自动判断是下跌还是上涨):1.黄金分割有两种算法,一种用高低区间;一种用低位算法;2.本公式采用高低区间算法,具体如下:高位下跌:a:计算高位和前低位的区间;b:H-区间*黄金分割点;低位上涨:a:计算低位和前高位的区间;b:L+区间*黄金分割点;高位下跌为浅粉红色;低位上涨为浅姜黄色;————————————————————————;即下跌有;高位下跌的黄金分割;上涨也有;低位上涨的黄金分割;————————————————————————;二:十等分(废除);————————————————————————;三:单阴测底与单阳测顶(参数写死,不能修改);采用徐小明的算法:进行测算;大盘采用正负3%为模;参数:X;个股采用正负6%为模;参数:Y;取模周期为低点5T天;参数:D;总周期为30T,参数:T;**参数k可以设置是否显示:1显示,0隐藏** ————————————————————————;四:高低点提示(废除):1.灰色横线:高点压力低点支撑;2.白色数字:高低点价格;高低点线可以看出中枢(箱体)上下沿;————————————————————————;五:集成简化版九转提示:黄点:九转“8”;笑脸哭脸:九转“9”;……;—————————————————————————————;2016-7-23日更新:1.去除黄金分割的多余显示;即显示低位,前面显示高位的标志-竖线;2.增加参数K;设置是否显示单阳测顶,单阴测底;3.增加显示多转显示,默认18,即重点显示9-13-18;t:=30;k:=0;HJ_1:=BACKSET(LLV(LOW,5)<REF(LLV(LOW,4),1),4);HJ_2:=BACKSET(HJ_1=0 AND REF(HJ_1,1)=1,2);HJ_3:=IF(HJ_2=1 AND REF(HJ_2,1)=0,(-1),0);HJ_4:=BACKSET(HHV(HIGH,5)>REF(HHV(HIGH,4),1),4);HJ_5:=BACKSET(HJ_4=0 AND REF(HJ_4,1)=1,2);HJ_6:=IF(HJ_5=1 AND REF(HJ_5,1)=0,1,0);HJ_7:=IF(LOW>REF(HIGH,1),1,IF(HIGH<REF(LOW,1),(-1),0));HJ_8:=BARSLAST(HJ_6=1);HJ_9:=BARSLAST(HJ_3=(-1));HJ_10:=LOWRANGE(LOW);HJ_11:=TOPRANGE(HIGH);HJ_12:=IF(HJ_3=(-1) AND REF(HJ_8,1)>REF(HJ_9,1) AND LLV(LOW,HJ_8+1)<REF(LLV(LOW,HJ_8+1),1),(-1),0);HJ_13:=IF(HJ_3=(-1) AND REF(HJ_8,1)<=REF(HJ_9,1) AND (HJ_8>=4 OR LLV(HJ_7,HJ_8)=(-1) OR LLV(LOW,HJ_9+2)<REF(LLV(LOW,HJ_9+1),1)),(-1),0);HJ_14:=IF(HJ_12=(-1) OR HJ_13=(-1) AND LOW<REF(HIGH,HJ_8+1),(-1),0);HJ_15:=IF(HJ_9<4 AND HHV(HJ_7,HJ_9)!=1 OR REF(HJ_14,HJ_9)=0,1,0);HJ_16:=IF(HJ_6=1 AND REF(HJ_9,1)<=REF(HJ_8,1) AND HJ_15=1 AND HJ_11>REF(HJ_10,HJ_9+1) AND HJ_11>REF(HJ_10,HJ_9) AND HJ_11>REF(HJ_11,HJ_8),1,0);HJ_17:=IF(HJ_6=1 AND REF(HJ_9,1)>REF(HJ_8,1) AND HHV(HIGH,HJ_9+1)>REF(HHV(HIGH,HJ_9+1),1),1,0);HJ_18:=IF(HJ_6=1 AND REF(HJ_9,1)<=REF(HJ_8,1) AND REF(HJ_14,HJ_9)=(-1) AND(HJ_9>=4 OR HHV(HJ_7,HJ_9)=1),1,0);HJ_19:=IF(HJ_17=1 OR HJ_18=1 OR HJ_16=1 AND HIGH>REF(LOW,HJ_9+1),1,0);HJ_20:=IF(HJ_8<4 AND HHV(HJ_7,HJ_8)!=1 OR REF(HJ_19,HJ_8)=0,1,0);HJ_21:=IF(HJ_3=(-1) AND REF(HJ_8,1)<=REF(HJ_9,1) AND HJ_20=1 AND HJ_10>REF(HJ_11,HJ_8+1) AND HJ_10>REF(HJ_11,HJ_8) AND HJ_10>REF(HJ_10,HJ_9),(-1),0);HJ_22:=IF(HJ_3=(-1) AND REF(HJ_8,1)>REF(HJ_9,1) AND LLV(LOW,HJ_8+1)<REF(LLV(LOW,HJ_8+1),1),(-1),0);HJ_23:=IF(HJ_3=(-1) AND REF(HJ_8,1)<=REF(HJ_9,1) AND (HJ_8>=4 OR LLV(HJ_7,HJ_8)=(-1) OR HJ_21=(-1)),(-1),0);HJ_24:=IF(HJ_22=(-1) OR HJ_23=(-1) AND LOW<REF(HIGH,HJ_8+1),(-1),0);HJ_25:=BARSLAST(HJ_19=1);HJ_26:=BARSLAST(HJ_24=(-1));HJ_27:=IF(HJ_26<4 AND HHV(HJ_7,HJ_26)!=1 OR REF(HJ_24,HJ_26)=0,1,0);HJ_28:=IF(HJ_6=1 AND REF(HJ_26,1)<=REF(HJ_25,1) AND HJ_27=1 AND HJ_11>REF(HJ_10,HJ_26+1) AND HJ_11>REF(HJ_10,HJ_26) AND HJ_11>REF(HJ_11,HJ_25),1,0);HJ_29:=IF(HJ_6=1 AND REF(HJ_26,1)>REF(HJ_25,1) AND HHV(HIGH,HJ_26+1)>REF(HHV(HIGH,HJ_26+1),1),1,0);HJ_30:=IF(HJ_6=1 AND REF(HJ_26,1)<=REF(HJ_25,1) AND REF(HJ_24,HJ_26)=(-1) AND (HJ_26>=4 OR HHV(HJ_7,HJ_26)=1),1,0);HJ_31:=IF(HJ_29=1 OR HJ_30=1 OR HJ_28=1 AND HIGH>REF(LOW,HJ_26+1),1,0); HJ_32:=IF(HJ_25<4 AND HHV(HJ_7,HJ_25)!=1 OR REF(HJ_29,HJ_25)=0,1,0);HJ_33:=IF(HJ_3=(-1) AND REF(HJ_25,1)<=REF(HJ_26,1) AND HJ_32=1 AND HJ_10>REF(HJ_11,HJ_25+1) AND HJ_10>REF(HJ_11,HJ_25) AND HJ_10>REF(HJ_10,HJ_26),(-1),0);HJ_34:=IF(HJ_3=(-1) AND REF(HJ_25,1)>REF(HJ_26,1) AND LLV(LOW,HJ_25+1)<REF(LLV(LOW,HJ_25+1),1),(-1),0);HJ_35:=IF(HJ_3=(-1) AND REF(HJ_25,1)<=REF(HJ_26,1) AND (HJ_25>=4 OR LLV(HJ_7,HJ_25)=(-1) OR HJ_33=(-1)),(-1),0);HJ_36:=IF(HJ_34=(-1) OR HJ_35=(-1) AND LOW<REF(HIGH,HJ_25+1),(-1),0);HJ_37:=BARSLAST(HJ_31=1);HJ_38:=BARSLAST(HJ_36=(-1));HJ_39:=IF(HJ_38<4 AND HHV(HJ_7,HJ_38)!=1 OR REF(HJ_36,HJ_38)=0,1,0);HJ_40:=IF(HJ_6=1 AND REF(HJ_38,1)<=REF(HJ_37,1) AND HJ_39=1 AND HJ_11>REF(HJ_10,HJ_38+1) AND HJ_11>REF(HJ_10,HJ_38) AND HJ_11>REF(HJ_11,HJ_37),1,0);HJ_41:=IF(HJ_6=1 AND REF(HJ_38,1)>REF(HJ_37,1) AND HHV(HIGH,HJ_38+1)>REF(HHV(HIGH,HJ_38+1),1),1,0);HJ_42:=IF(HJ_6=1 AND REF(HJ_38,1)<=REF(HJ_37,1) AND REF(HJ_36,HJ_38)=(-1) AND (HJ_38>=4 OR HHV(HJ_7,HJ_38)=1),1,0);HJ_43:=IF(HJ_41=1 OR HJ_42=1 OR HJ_40=1 AND HIGH>REF(LOW,HJ_38+1),1,0); HJ_44:=IF(HJ_37<4 AND HHV(HJ_7,HJ_37)!=1 OR REF(HJ_41,HJ_37)=0,1,0);HJ_45:=IF(HJ_3=(-1) AND REF(HJ_37,1)<=REF(HJ_38,1) AND HJ_44=1 ANDHJ_10>REF(HJ_11,HJ_37+1) AND HJ_10>REF(HJ_11,HJ_37) AND HJ_10>REF(HJ_10,HJ_38),(-1),0);HJ_46:=IF(HJ_3=(-1) AND REF(HJ_37,1)>REF(HJ_38,1) AND LLV(LOW,HJ_37+1)<REF(LLV(LOW,HJ_37+1),1),(-1),0);HJ_47:=IF(HJ_3=(-1) AND REF(HJ_37,1)<=REF(HJ_38,1) AND (HJ_37>=4 OR LLV(HJ_7,HJ_37)=(-1) OR HJ_45=(-1)),(-1),0);HJ_48:=IF(HJ_46=(-1) OR HJ_47=(-1) AND LOW<REF(HIGH,HJ_37+1),(-1),0);HJ_49:=IF(HJ_43=1 AND HJ_48=(-1) AND HIGH>REF(HIGH,REF(HJ_37,1)+2),1,IF(HJ_43=1 AND HJ_48=(-1) AND LOW<REF(LOW,REF(HJ_38,1)+2),(-1),0));HJ_50:=IF(HJ_49=0,HJ_43+HJ_48,HJ_49);HJ_51:=IF(DATE<1161215,1,0);HJ_52:=IF(HJ_50=(-1),LOW,IF(HJ_50=1,HIGH,DRAWNULL));HJ_53:=DRAWLINE(HJ_50=(-1),HJ_52,HJ_50=1,HJ_52,0);HJ_54:=DRAWLINE(HJ_50=1,HJ_52,HJ_50=(-1),HJ_52,0);HJ_55:=HJ_53=HJ_54 AND HJ_4 AND HJ_50=1;HJ_56:=IF(HJ_55,HIGH*HJ_51,DRAWNULL);HJ_57:=HJ_53=HJ_54 AND HJ_1 AND HJ_50=(-1);HJ_58:=IF(HJ_57,LOW*HJ_51,DRAWNULL);HJ_59:=LLV(LOW,T)=HJ_58*HJ_51;HJ_60:=BARSLAST(HJ_59);HJ_61:=HHV(HIGH,T)=HJ_56*HJ_51;HJ_62:=BARSLAST(HJ_61);HJ_63:=IF(HJ_62>HJ_60,0,1);HJ_64:=BACKSET(ISLASTBAR,HJ_62+1);HJ_65:=BARSLAST(HJ_64=1 AND REF(HJ_64,1)=0);HJ_66:=BACKSET(ISLASTBAR,HJ_60+1);HJ_67:=BARSLAST(HJ_66=1 AND REF(HJ_66,1)=0);HJ_68:=IF(HJ_65>HJ_67,0,1);HJ_69:=IF(HJ_63=0 AND HJ_68=0,REF(HIGH,HJ_62)-REF(LOW,HJ_60),DRAWNULL); STICKLINE(HJ_66=1 AND REF(HJ_66,1)=0 AND HJ_63=0 AND HJ_68=0,REF(LOW,HJ_60),REF(LOW,HJ_60)+HJ_69*1,0.5,(-1)),COLOR0065CA; NOTEXT0:IF(HJ_63=0 AND HJ_68=0,DRAWLINE(HJ_59,LOW,ISLASTBAR,REF(LOW,HJ_60)+HJ_69*0,(-1)),DRAWNUL L),DOTLINE,COLOR0065CA;DRAWNUMBER(ISLASTBAR AND HJ_63=0 AND HJ_68=0,NOTEXT0,REF(LOW,HJ_60)),COLOR0065CA;DRAWNUMBER(HJ_59 AND HJ_63=0 AND HJ_68=0,NOTEXT0,0),COLOR0065CA; NOTEXT1:IF(HJ_63=0 AND HJ_68=0,DRAWLINE(HJ_59,LOW+HJ_69*0.191,ISLASTBAR,REF(LOW,HJ_60)+HJ_69*0. 191,(-1)),DRAWNULL),DOTLINE,COLOR0065CA;DRAWNUMBER(ISLASTBAR AND HJ_63=0 AND HJ_68=0,NOTEXT1,REF(LOW,HJ_60)+HJ_69*0.191),COLOR0065CA; DRAWNUMBER(HJ_59 AND HJ_63=0 AND HJ_68=0,NOTEXT1,0.191),COLOR0065CA;NOTEXT3:IF(HJ_63=0 AND HJ_68=0,DRAWLINE(HJ_59,LOW+HJ_69*0.382,ISLASTBAR,REF(LOW,HJ_60)+HJ_69*0. 382,(-1)),DRAWNULL),DOTLINE,COLOR0065CA;DRAWNUMBER(ISLASTBAR AND HJ_63=0 AND HJ_68=0,NOTEXT3,REF(LOW,HJ_60)+HJ_69*0.382),COLOR0065CA; DRAWNUMBER(HJ_59 AND HJ_63=0 AND HJ_68=0,NOTEXT3,0.382),COLOR0065CA; NOTEXT5:IF(HJ_63=0 AND HJ_68=0,DRAWLINE(HJ_59,LOW+HJ_69*0.5,ISLASTBAR,REF(LOW,HJ_60)+HJ_69*0.5,( -1)),DRAWNULL),DOTLINE,COLOR0065CA;DRAWNUMBER(ISLASTBAR AND HJ_63=0 AND HJ_68=0,NOTEXT5,REF(LOW,HJ_60)+HJ_69*0.5),COLOR0065CA;DRAWNUMBER(HJ_59 AND HJ_63=0 AND HJ_68=0,NOTEXT5,0.5),COLOR0065CA; NOTEXT6:IF(HJ_63=0 AND HJ_68=0,DRAWLINE(HJ_59,LOW+HJ_69*0.618,ISLASTBAR,REF(LOW,HJ_60)+HJ_69*0. 618,(-1)),DRAWNULL),DOTLINE,COLOR0065CA;DRAWNUMBER(ISLASTBAR AND HJ_63=0 AND HJ_68=0,NOTEXT6,REF(LOW,HJ_60)+HJ_69*0.618),COLOR0065CA; DRAWNUMBER(HJ_59 AND HJ_63=0 AND HJ_68=0,NOTEXT6,0.618),COLOR0065CA; NOTEXT8:IF(HJ_63=0 AND HJ_68=0,DRAWLINE(HJ_59,LOW+HJ_69*0.809,ISLASTBAR,REF(LOW,HJ_60)+HJ_69*0. 809,(-1)),DRAWNULL),DOTLINE,COLOR0065CA;DRAWNUMBER(ISLASTBAR AND HJ_63=0 AND HJ_68=0,NOTEXT8,REF(LOW,HJ_60)+HJ_69*0.809),COLOR0065CA; DRAWNUMBER(HJ_59 AND HJ_63=0 AND HJ_68=0,NOTEXT8,0.809),COLOR0065CA; NOTEXT2:IF(HJ_63=0 AND HJ_68=0,DRAWLINE(HJ_59,REF(HIGH,HJ_62),ISLASTBAR,REF(LOW,HJ_60)+HJ_69*1,(-1)),DRAWNULL),DOTLINE,COLOR0065CA;DRAWNUMBER(ISLASTBAR AND HJ_63=0 AND HJ_68=0,NOTEXT2,REF(LOW,HJ_60)+HJ_69*1),COLOR0065CA;DRAWNUMBER(HJ_59 AND HJ_63=0 AND HJ_68=0,NOTEXT2,1),COLOR0065CA;HJ_70:=IF(HJ_63=1 AND HJ_68=1,REF(HIGH,HJ_62)-REF(LOW,HJ_60),DRAWNULL); STICKLINE(HJ_64=1 AND REF(HJ_64,1)=0 AND HJ_63=1 AND HJ_68=1,REF(HIGH,HJ_62),REF(HIGH,HJ_62)-HJ_70*1,0.5,(-1)),COLORC080FF; NOTEXTH0:IF(HJ_63=1 AND HJ_68=1,DRAWLINE(HJ_61,HIGH,ISLASTBAR,REF(HIGH,HJ_62)-HJ_70*0,(-1)),DRAWNU LL),DOTLINE,COLORC080FF;DRAWNUMBER(ISLASTBAR AND HJ_63=1 AND HJ_68=1,NOTEXTH0,REF(HIGH,HJ_62)),COLORC080FF;DRAWNUMBER(HJ_61 AND HJ_63=1 AND HJ_68=1,NOTEXTH0,0),COLORC080FF; NOTEXTH1:IF(HJ_63=1 AND HJ_68=1,DRAWLINE(HJ_61,HIGH-HJ_70*0.191,ISLASTBAR,REF(HIGH,HJ_62)-HJ_70*0. 191,(-1)),DRAWNULL),DOTLINE,COLORC080FF;DRAWNUMBER(ISLASTBAR AND HJ_63=1 AND HJ_68=1,NOTEXTH1,REF(HIGH,HJ_62)-HJ_70*0.191),COLORC080FF;DRAWNUMBER(HJ_61 AND HJ_63=1 AND HJ_68=1,NOTEXTH1,0.191),COLORC080FF; NOTEXTH3:IF(HJ_63=1 AND HJ_68=1,DRAWLINE(HJ_61,HIGH-HJ_70*0.382,ISLASTBAR,REF(HIGH,HJ_62)-HJ_70*0. 382,(-1)),DRAWNULL),DOTLINE,COLORC080FF;DRAWNUMBER(ISLASTBAR AND HJ_63=1 AND HJ_68=1,NOTEXTH3,REF(HIGH,HJ_62)-HJ_70*0.382),COLORC080FF; DRAWNUMBER(HJ_61 AND HJ_63=1 AND HJ_68=1,NOTEXTH3,0.382),COLORC080FF; NOTEXTH5:IF(HJ_63=1 AND HJ_68=1,DRAWLINE(HJ_61,HIGH-HJ_70*0.5,ISLASTBAR,REF(HIGH,HJ_62)-HJ_70*0.5,( -1)),DRAWNULL),DOTLINE,COLORC080FF;DRAWNUMBER(ISLASTBAR AND HJ_63=1 AND HJ_68=1,NOTEXTH5,REF(HIGH,HJ_62)-HJ_70*0.5),COLORC080FF; DRAWNUMBER(HJ_61 AND HJ_63=1 AND HJ_68=1,NOTEXTH5,0.5),COLORC080FF; NOTEXTH6:IF(HJ_63=1 AND HJ_68=1,DRAWLINE(HJ_61,HIGH-HJ_70*0.618,ISLASTBAR,REF(HIGH,HJ_62)-HJ_70*0. 618,(-1)),DRAWNULL),DOTLINE,COLORC080FF;DRAWNUMBER(ISLASTBAR AND HJ_63=1 AND HJ_68=1,NOTEXTH6,REF(HIGH,HJ_62)-HJ_70*0.618),COLORC080FF; DRAWNUMBER(HJ_61 AND HJ_63=1 AND HJ_68=1,NOTEXTH6,0.618),COLORC080FF; NOTEXTH8:IF(HJ_63=1 AND HJ_68=1,DRAWLINE(HJ_61,HIGH-HJ_70*0.809,ISLASTBAR,REF(HIGH,HJ_62)-HJ_70*0. 809,(-1)),DRAWNULL),DOTLINE,COLORC080FF;DRAWNUMBER(ISLASTBAR AND HJ_63=1 AND HJ_68=1,NOTEXTH8,REF(HIGH,HJ_62)-HJ_70*0.809),COLORC080FF; DRAWNUMBER(HJ_61 AND HJ_63=1 AND HJ_68=1,NOTEXTH8,0.809),COLORC080FF; NOTEXTH2:IF(HJ_63=1 AND HJ_68=1,DRAWLINE(HJ_61,REF(HIGH,HJ_62)-HJ_70*1,ISLASTBAR,REF(HIGH,HJ_62)-H J_70*1,(-1)),DRAWNULL),DOTLINE,COLORC080FF;DRAWNUMBER(ISLASTBAR AND HJ_63=1 AND HJ_68=1,NOTEXTH2,REF(HIGH,HJ_62)-HJ_70*1),COLORC080FF;DRAWNUMBER(HJ_61 AND HJ_63=1 AND HJ_68=1,NOTEXTH2,1),COLORC080FF;HJ_71:=3;HJ_72:=3;HJ_73:=5;HJ_74:=IF(CLOSE>500,HJ_71,HJ_72);HJ_75:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;HJ_76:=IF(HJ_60<=HJ_73,HHV(HJ_75,HJ_60+1),DRAWNULL);HJ_77:=IF(HJ_60<=HJ_73,HHVBARS(HJ_75,HJ_60+1),DRAWNULL);HJ_78:=IF(REF(HJ_75,HJ_77)>=HJ_74,REF(CLOSE,HJ_77)*REF(CLOSE,HJ_77)/REF(CLO SE,HJ_77+1)/0.9,DRAWNULL);HJ_79:=BACKSET(REF(HJ_75,HJ_77)>=HJ_74 AND HJ_60<=HJ_73,HJ_77+1);HJ_80:=BARSLAST(HJ_79=1 AND REF(HJ_79,1)=0);HJ_81:=BACKSET(ISLASTBAR,HJ_80+1);STICKLINE(HJ_81=1 AND REF(HJ_81,1)=0 ANDK=1,HIGH,HJ_78,0.5,(-1)),COLORYELLOW;NOTEXT测顶:IF(K=1,DRAWLINE(HJ_81=1 AND REF(HJ_81,1)=0,HJ_78,ISLASTBAR,REF(CLOSE,HJ_80)*REF(CLOSE,HJ_80)/REF(CLOSE, HJ_80+1)/0.9,(-2)),DRAWNULL),DOTLINE,COLORYELLOW;DRAWNUMBER(HJ_81=1 AND REF(HJ_81,1)=0 AND K=1,HJ_78,HJ_78),COLORYELLOW; HJ_82:=IF(HJ_62<=HJ_73,LLV(HJ_75,HJ_62+1),DRAWNULL);HJ_83:=IF(HJ_62<=HJ_73,LLVBARS(HJ_75,HJ_62+1),DRAWNULL);HJ_84:=IF(REF(HJ_75,HJ_83)<=(-HJ_74),REF(CLOSE,HJ_83)*REF(CLOSE,HJ_83)/REF(C LOSE,HJ_83+1)/1.1,DRAWNULL);HJ_85:=BACKSET(REF(HJ_75,HJ_83)<=(-HJ_74) AND HJ_62<=HJ_73,HJ_83+1);HJ_86:=BARSLAST(HJ_85=1 AND REF(HJ_85,1)=0);HJ_87:=BACKSET(ISLASTBAR,HJ_86+1);STICKLINE(HJ_87=1 AND REF(HJ_87,1)=0 AND K=1,LOW,HJ_84,0.5,(-1)),COLORCYAN; NOTEXT测底:IF(K=1,DRAWLINE(HJ_87=1 AND REF(HJ_87,1)=0,HJ_84,ISLASTBAR,REF(CLOSE,HJ_86)*REF(CLOSE,HJ_86)/REF(CLOSE, HJ_86+1)/1.1,(-2)),DRAWNULL),DOTLINE,COLORCYAN;DRAWNUMBER(HJ_87=1 AND REF(HJ_87,1)=0 AND K=1,HJ_84,HJ_84),COLORCYAN; HJ_88:=CLOSE>REF(CLOSE,4);HJ_89:=BARSLASTCOUNT(HJ_88);HJ_90:=HJ_89=18;HJ_91:=ISLASTBAR AND BETWEEN(HJ_89,1,17);HJ_92:=(BACKSET(HJ_90>0,18) OR BACKSET(HJ_91>0,HJ_89))*HJ_89; DRAWNUMBER(HJ_92>0,HIGH*1.02,HJ_92),COLORMAGENTA;DRAWNUMBER(HJ_89=9,HIGH*1.02,9),COLORGREEN;DRAWNUMBER(HJ_89=13,HIGH*1.02,13),COLORYELLOW;DRAWNUMBER(HJ_89=18,HIGH*1.02,18),COLORYELLOW;HJ_93:=CLOSE<REF(CLOSE,4);HJ_94:=BARSLASTCOUNT(HJ_93);HJ_95:=HJ_94=18;HJ_96:=ISLASTBAR AND BETWEEN(HJ_94,1,17);HJ_97:=(BACKSET(HJ_95>0,18) OR BACKSET(HJ_96>0,HJ_94))*HJ_94; DRAWNUMBER(HJ_97>0,LOW*0.98,HJ_97),COLORMAGENTA;DRAWNUMBER(HJ_94=9,LOW*0.98,9),COLORGREEN;DRAWNUMBER(HJ_94=13,LOW*0.98,13),COLORYELLOW;DRAWNUMBER(HJ_94=18,LOW*0.98,18),COLORYELLOW;DRAWKLINE(HIGH,OPEN,LOW,CLOSE);HJ_98:=IF(HJ_51=1,HIGH=HHV(HIGH,60),0);HJ_99:=IF(HJ_51=1,LOW=LLV(LOW,60),0);HJ_100:=BARSLAST(HJ_98);HJ_101:=BARSLAST(HJ_99);HJ_102:=BACKSET(ISLASTBAR,HJ_100+1);HJ_103:=BACKSET(ISLASTBAR,HJ_101+1);HJ_104:=BARSSINCE(HJ_102)+1;HJ_105:=BARSSINCE(HJ_103)+1;HJ_106:=IF(BACKSET(HJ_102,HJ_104+1),1,DRAWNULL);HJ_107:=IF(BACKSET(HJ_103,HJ_105+1),1,DRAWNULL);HJ_108:=HJ_107*SUM(HIGH*VOL,HJ_105)/SUM(VOL,HJ_105);HJ_109:=HJ_106*SUM(LOW*VOL,HJ_104)/SUM(VOL,HJ_104);HJ_110:=HJ_107*SUM(LOW*VOL,HJ_105)/SUM(VOL,HJ_105);HJ_111:=HJ_106*SUM(HIGH*VOL,HJ_104)/SUM(VOL,HJ_104);NOTEXT点金_支:IF(REF(HIGH,HJ_104)>REF(HIGH,HJ_104+1) AND REF(HIGH,HJ_104)>REF(HIGH,HJ_104-1),HJ_108,HJ_109),COLOR00FF7F;NOTEXT点金_支1:IF(REF(HIGH,HJ_104)>REF(HIGH,HJ_104+1) AND REF(HIGH,HJ_104)>REF(HIGH,HJ_104-1),HJ_110,HJ_111),COLORGREEN,LINETHICK2; NOTEXT点金_压:IF(REF(HIGH,HJ_105)>REF(HIGH,HJ_105+1) AND REF(HIGH,HJ_105)>REF(HIGH,HJ_105-1),HJ_109,HJ_108),COLORLIMAGENTA; NOTEXT点金_压1:IF(REF(HIGH,HJ_105)>REF(HIGH,HJ_105+1) AND REF(HIGH,HJ_105)>REF(HIGH,HJ_105-1),HJ_111,HJ_110),COLORRED,LINETHICK2; DRAWNUMBER(ISLASTBAR,NOTEXT点金_压*1,CONST(NOTEXT点金_压)),COLORRED; DRAWNUMBER(ISLASTBAR,NOTEXT点金_支*1,CONST(NOTEXT点金_支)),COLORGREEN; DRAWNUMBER(ISLASTBAR,NOTEXT点金_压1*1,CONST(NOTEXT点金_压1)),COLORLIMAGENTA;DRAWNUMBER(ISLASTBAR,NOTEXT点金_支1*1,CONST(NOTEXT点金_支1)),COLOR00FF7F;。