通达信指标——神秘均线(主图)
通达信云顶天宫指标源码
通达信云顶天宫指标源码通达信是一种股票分析软件,云顶天宫是其中一个指标,具体的源码我们无法提供。
但是,可以为您提供云顶天宫的基本概念和原理,以及如何自己编写云顶天宫指标的思路。
云顶天宫指标是一种技术分析指标,用于研究股票的走势以及买卖时机。
它是由多个移动平均线组成,用于捕捉股票价格的趋势。
基本概念:云顶天宫指标的构成包括三条线,即云线、顶线和天线。
云线是最短周期的移动平均线,它代表着较短时间内的价格趋势;顶线是中期周期的移动平均线,它代表着中期价格趋势;天线是长期周期的移动平均线,它代表着较长时间内的价格趋势。
原理:云顶天宫指标的原理是通过不同周期的移动平均线的交叉点来判断股票的买卖时机。
当云线从下方穿过顶线,并且天线也在上升时,是买入的信号;相反,当云线从上方穿过顶线,并且天线也在下降时,是卖出的信号。
编写思路:要编写云顶天宫指标,首先需要确定移动平均线的周期。
一般情况下,云线周期为5日,顶线周期为10日,天线周期为20日。
根据这些参数,可以计算出相应周期的移动平均线。
其次,根据移动平均线的计算结果,可以判断云线、顶线和天线的交叉点。
当云线从下方穿过顶线,并且天线也在上升时,可以设置一个买入信号;相反,当云线从上方穿过顶线,并且天线也在下降时,可以设置一个卖出信号。
最后,可以将编写的代码应用到通达信软件中进行回测和实盘操作。
总结:云顶天宫指标是一种技术分析指标,用于研究股票的走势以及买卖时机。
它由多个移动平均线组成,并通过移动平均线的交叉点来判断买卖信号。
要编写云顶天宫指标,需要确定移动平均线的周期,并根据交叉点设置买卖信号。
通过在通达信软件中运行编写的指标,可以进行回测和实盘操作。
神奇线(开花线)通达信指标公式源码
神奇线(开花线) (主图源码)M5:=MA(O,5);M10:=MA(O,10);M20:=MA(O,20);M30:=MA(O,30);M40:=MA(O,40);M60:=MA(O,60);M80:=MA(O,80);M90:=MA(O,90);M120:=MA(O,120);M180:=MA(O,180);M270:=MA(O,270);M360:=MA(O,360);M480:=MA(O,480);M540:=MA(O,540);M640:=MA(O,640);M720:=MA(O,720);M810:=MA(O,810);M960:=MA(O,960);M1080:=MA(O,1080);M1440:=MA(O,1440);M1920:=MA(O,1920);M2160:=MA(O,2160);M2560:=MA(O,2560);M3240:=MA(O,3240);M4320:=MA(O,4320);M5120:=MA(O,5120);M6480:=MA(O,6480);M7290:=MA(O,7290);M8640:=MA(O,8640);M9720:=MA(O,9720);M10240:=MA(O,10240);M12960:=MA(O,12960);M14580:=MA(O,14580);LL1:=IF(PERIOD=14 OR PERIOD=11 OR PERIOD=10 OR PERIOD=18 OR PERIOD=17 OR PERIOD=16 OR PERIOD=15 OR PERIOD=7,1,0);H20%:IF(ISLASTBAR AND LL1=1,H-H*0.2,DRAWNULL),COLORGRAY,LINETHICK7; DRAWNUMBER(H20%<>DRAWNULL AND LL1=1,H20%,H20%),COLORGRAY;H30%:IF(ISLASTBAR AND LL1=1,H-H*0.3,DRAWNULL),COLORGREEN,LINETHICK7; DRAWNUMBER(H30%<>DRAWNULL AND LL1=1,H30%,H30%),COLORGREEN;H40%:IF(ISLASTBAR AND LL1=1,H-H*0.4,DRAWNULL),COLORGRAY,LINETHICK7; DRAWNUMBER(H40%<>DRAWNULL AND LL1=1,H40%,H40%),COLORGRAY;H50%:IF(ISLASTBAR AND LL1=1,H-H*0.5,DRAWNULL),COLORGREEN,LINETHICK7; DRAWNUMBER(H50%<>DRAWNULL AND LL1=1,H50%,H50%),COLORGREEN;H60%:IF(ISLASTBAR AND LL1=1,H-H*0.6,DRAWNULL),COLORGRAY,LINETHICK7; DRAWNUMBER(H60%<>DRAWNULL AND LL1=1,H60%,H60%),COLORGRAY;H70%:IF(ISLASTBAR AND LL1=1,H-H*0.7,DRAWNULL),COLORGREEN,LINETHICK7; DRAWNUMBER(H70%<>DRAWNULL AND LL1=1,H70%,H70%),COLORGREEN;H80%:IF(ISLASTBAR AND LL1=1,H-H*0.8,DRAWNULL),COLORGRAY,LINETHICK5; DRAWNUMBER(H80%<>DRAWNULL AND LL1=1,H80%,H80%),COLORGRAY;H90%:IF(ISLASTBAR AND LL1=1,H-H*0.9,DRAWNULL),COLORGREEN,LINETHICK7; DRAWNUMBER(H90%<>DRAWNULL AND LL1=1,H90%,H90%),COLORGREEN;H99%:IF(ISLASTBAR AND LL1=1,H-H*0.99,DRAWNULL),COLORYELLOW,LINETHICK7; DRAWNUMBER(H99%<>DRAWNULL AND LL1=1,H99%,H99%),COLORGREEN;LL2:=IF(PERIOD=5,1,0);QC:IF(ISLASTBAR AND LL2=1, REF(CLOSE,1),DRAWNULL),COLORLIGREEN,LINETHICK4; ZHANG2%:IF(ISLASTBAR ANDLL2=1,QC+QC*0.02,DRAWNULL),COLORWHITE,LINETHICK3;{DRAWNUMBER(ZHANG2%<>DRAWNULL ANDLL2=1,ZHANG2%,ZHANG2%),COLORWHITE;}ZHANG3%:=IF(ISLASTBAR ANDLL2=1,QC+QC*0.03,DRAWNULL),COLORBLUE,LINETHICK4;{DRAWNUMBER(ZHANG3%<>DRAWNULL ANDLL2=1,ZHANG3%,ZHANG3%),COLORWHITE;}ZHANG4%:=IF(ISLASTBAR ANDLL2=1,QC+QC*0.04,DRAWNULL),COLORWHITE,LINETHICK3;{DRAWNUMBER(ZHANG4%<>DRAWNULL ANDLL2=1,ZHANG4%,ZHANG4%),COLORWHITE;}ZHANG5%:IF(ISLASTBAR ANDLL2=1,QC+QC*0.05,DRAWNULL),COLORBLUE,LINETHICK4;{DRAWNUMBER(ZHANG5%<>DRAWNULL ANDLL2=1,ZHANG5%,ZHANG5%),COLORWHITE;}ZHANG6%:=IF(ISLASTBAR ANDLL2=1,QC+QC*0.06,DRAWNULL),COLORWHITE,LINETHICK3;{DRAWNUMBER(ZHANG6%<>DRAWNULL ANDLL2=1,ZHANG6%,ZHANG6%),COLORWHITE;}ZHANG7%:=IF(ISLASTBAR ANDLL2=1,QC+QC*0.07,DRAWNULL),COLORBLUE,LINETHICK4;{DRAWNUMBER(ZHANG7%<>DRAWNULL ANDLL2=1,ZHANG7%,ZHANG7%),COLORWHITE;}ZHANG8%:IF(ISLASTBAR ANDLL2=1,QC+QC*0.08,DRAWNULL),COLORWHITE,LINETHICK3;{DRAWNUMBER(ZHANG8%<>DRAWNULL ANDLL2=1,ZHANG8%,ZHANG8%),COLORWHITE;}ZHANG9%:=IF(ISLASTBAR ANDLL2=1,QC+QC*0.09,DRAWNULL),COLORBLUE,LINETHICK3;{DRAWNUMBER(ZHANG9%<>DRAWNULL ANDLL2=1,ZHANG8%,ZHANG8%),COLORWHITE;}ZHANG10%:IF(ISLASTBAR ANDLL2=1,QC+QC*0.1,DRAWNULL),COLORBLUE,LINETHICK4;{DRAWNUMBER(ZHANG10%<>DRAWNULL ANDLL2=1,ZHANG10%,ZHANG10%),COLORWHITE;}DIE2%:IF(ISLASTBAR AND LL2=1,QC-QC*0.02,DRAWNULL),COLORGRAY,LINETHICK3; {DRAWNUMBER(DIE2%<>DRAWNULL AND LL2=1,DIE2%,DIE2%),COLORGRAY;}DIE3%:=IF(ISLASTBAR AND LL2=1,QC-QC*0.03,DRAWNULL),COLORBLUE,LINETHICK4; {DRAWNUMBER(DIE3%<>DRAWNULL AND LL2=1,DIE3%,DIE3%),COLORGRAY;}DIE4%:=IF(ISLASTBAR AND LL2=1,QC-QC*0.04,DRAWNULL),COLORGRAY,LINETHICK3; {DRAWNUMBER(DIE4%<>DRAWNULL AND LL2=1,DIE4%,DIE4%),COLORGRAY;}DIE5%:IF(ISLASTBAR AND LL2=1,QC-QC*0.05,DRAWNULL),COLORBLUE,LINETHICK4; {DRAWNUMBER(DIE5%<>DRAWNULL AND LL2=1,DIE5%,DIE5%),COLORGRAY;}DIE6%:=IF(ISLASTBAR AND LL2=1,QC-QC*0.06,DRAWNULL),COLORGRAY,LINETHICK3; {DRAWNUMBER(DIE6%<>DRAWNULL AND LL2=1,DIE6%,DIE6%),COLORGRAY;}DIE7%:=IF(ISLASTBAR AND LL2=1,QC-QC*0.07,DRAWNULL),COLORBLUE,LINETHICK4; {DRAWNUMBER(DIE7%<>DRAWNULL AND LL2=1,DIE7%,DIE7%),COLORGRAY;}DIE8%:IF(ISLASTBAR AND LL2=1,QC-QC*0.08,DRAWNULL),COLORGRAY,LINETHICK3; {DRAWNUMBER(DIE8%<>DRAWNULL AND LL2=1,DIE8%,DIE8%),COLORGRAY;}DIE9%:=IF(ISLASTBAR AND LL2=1,QC-QC*0.09,DRAWNULL),COLORGRAY,LINETHICK3; {DRAWNUMBER(DIE9%<>DRAWNULL AND LL2=1,DIE9%,DIE9%),COLORGRAY;}DIE10%:IF(ISLASTBAR AND LL2=1,QC-QC*0.1,DRAWNULL),COLORBLUE,LINETHICK4; {DRAWNUMBER(DIE10%<>DRAWNULL AND LL2=1,DIE10%,DIE10%),COLORGRAY;} B10:MIN(M10,M5),LINETHICK3,COLORRED;B20:MIN(M20,B10),COLORBLUE;B30:MIN(M30,B20),COLORGREEN;B40:MIN(M40,B30),COLORGREEN;B60:MIN(M60,B40),COLORCYAN;B80:MIN(M80,B60),COLORRED;B90:MIN(M90,B80),COLORMAGENTA;B120:MIN(M120,B90),COLORMAGENTA;B180:MIN(M180,B120),COLORLIGRAY;B270:MIN(M270,B180),COLORLIBLUE;B360:MIN(M360,B270),COLORLIGREEN;B480:MIN(M480,B360),COLORLICYAN;B640:MIN(M640,B480),COLORLICYAN;B720:MIN(M720,B640),COLORLIRED;B810:MIN(M810,B720),COLORLIMAGENTA;B960:MIN(M960,B810),COLORLIMAGENTA;B1080:MIN(M1080,B960),COLORLIMAGENTA;B1440:MIN(M1440,B1080),COLORYELLOW;B1920:MIN(M1920,B1440),COLORYELLOW;B2160:MIN(M2160,B1920),COLORYELLOW;B2560:MIN(M2560,B2160),COLORWHITE;B3240:MIN(M3240,B2560),COLORGREEN;B4320:MIN(M4320,B3240),COLORGREEN;B5120:MIN(M5120,B4320),COLORGREEN;B6480:MIN(M6480,B5120),COLORCYAN;B7290:MIN(M7290,B6480),COLORCYAN;B8640:MIN(M8640,B7290),COLORCYAN;B9720:MIN(M9720,B8640),COLORCYAN;B10240:MIN(M10240,B9720),COLORCYAN;B12960:MIN(M12960,B10240),COLORCYAN; B14580:MIN(M14580,B12960),COLORCYAN;S10:MAX(M10,M5),LINETHICK3,COLORRED; S20:MAX(M20,S10),COLORBLUE;S30:MAX(M30,S20),COLORGREEN;S40:MAX(M40,S30),COLORGREEN;S60:MAX(M60,S40),COLORCYAN;S80:MAX(M80,S60),COLORRED;S90:MAX(M90,S80),COLORMAGENTA;S120:MAX(M120,S90),COLORMAGENTA;S180:MAX(M180,S120),COLORLIGRAY;S270:MAX(M270,S180),COLORLIBLUE;S360:MAX(M360,S270),COLORLIGREEN;S480:MAX(M480,S360),COLORLICYAN;S640:MAX(M640,S480),COLORLICYAN;S720:MAX(M720,S640),COLORLIRED;S810:MAX(M810,S720),COLORLIMAGENTA; S960:MAX(M960,S810),COLORLIMAGENTA; S1080:MAX(M1080,S960),COLORLIMAGENTA; S1440:MAX(M1440,S1080),COLORYELLOW; S1920:MAX(M1920,S1440),COLORYELLOW; S2160:MAX(M2160,S1920),COLORYELLOW;S2560:MAX(M2560,S2160),COLORWHITE;S3240:MAX(M3240,S2560),COLORGREEN;S4320:MAX(M4320,S3240),COLORGREEN;S5120:MAX(M5120,S4320),COLORGREEN;S6480:MAX(M6480,S5120),COLORCYAN;S7290:MAX(M7290,S6480),COLORCYAN;S8640:MAX(M8640,S7290),COLORCYAN;S9720:MAX(M9720,S8640),COLORCYAN;S10240:MAX(M10240,S9720),COLORCYAN; S12960:MAX(M12960,S10240),COLORCYAN; S14580:MAX(M14580,S12960),COLORCYAN;。
通达信指标公式源码(MA均线)主图指标
(MA均线)主图指标M5:MA(C,5),COLORWHITE;M10:MA(C,10),COLORYELLOW;M20:MA(C,20),COLORCYAN;M60:MA(C,60),COLORGREEN,LINETHICK2;M120:MA(C,120),COLORRED,LINETHICK2;TY:=C;A1:=REF(TY,10)=HHV(TY,2*10+1);B1:=FILTER(A1,10);C1:=BACKSET(B1,10+1);HD:=FILTER(C1,10);A2:=REF(TY,10)=LLV(TY,2*10+1);B2:=FILTER(A2,10);C2:=BACKSET(B2,10+1);LD:=FILTER(C2,10);前期高位:REF(C,BARSLAST(HD)),COLOR8000FF,POINTDOT;STICKLINE(C,前期高位,前期高位,8,0),COLOR8000FF;JRH:=HHV(C,2);JRL:=LLV(C,2);VAR01:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));VAR02:=(REF(VAR01,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR03:=(REF(VAR02,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR04:=(REF(VAR03,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR05:=(REF(VAR04,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR06:=(REF(VAR05,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR07:=(REF(VAR06,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR08:=(REF(VAR07,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR09:=(REF(VAR08,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VARA:=(REF(VAR09,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)); 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)); VAR010:=(REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR011:=(REF(VAR010,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR012:=(REF(VAR011,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR013:=(REF(VAR012,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR014:=(REF(VAR013,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR015:=(REF(VAR014,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR016:=(REF(VAR015,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR017:=(REF(VAR016,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR018:=(REF(VAR017,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR019:=((REF(VARD OR VARE OR VARF OR VAR010 OR VAR011 OR VAR012 OR VAR013OR VAR014 OR VAR015 OR VAR016 OR VAR017 OR VAR018,1)) AND VAR01);VAR1A:=((REF(VAR01 OR VAR02 OR VAR03 OR VAR04 OR VAR05 OR VAR06 OR VAR07 OR VAR08 OR VAR09 OR VARA OR VARB OR VARC,1)) AND VARD);红色持股:=VAR01 OR VAR02 OR VAR03 OR VAR04 OR VAR05 OR VAR06 OR VAR07 OR VAR08 OR VAR09 OR VARA OR VARB OR VARC,COLOR0000FF,NODRAW;离场:=IF(红色持股,JRL,DRAWNULL);明离场价:=离场,COLORFF99FF,NODRAW;青色观望:=VARD OR VARE OR VARF OR VAR010 OR VAR011 OR VAR012 OR VAR013 OR VAR014 OR VAR015 OR VAR016 OR VAR017 OR VAR018,COLORFFFF00,NODRAW;进:=IF(青色观望,JRH,DRAWNULL);今离场价:REF(离场,1),COLOR0000FF,NODRAW;明进场价:=进,COLOR33AACC,NODRAW;今进场价:REF(明进场价,1),COLORGREEN,NODRAW;上涨家数:INDEXADV,COLOR0080FF,NODRAW;下跌家数:INDEXDEC,COLORGREEN,NODRAW;DRAWTEXT_FIX(1,0.00,0,0,'所属行业:')COLOR00FFFF;DRAWTEXT_FIX(1,0.07,0,0,HYBLOCK)COLOR00FFFF;DRAWTEXT_FIX(1,0.14,0,0,'所属地区:')COLOR00FFFF;DRAWTEXT_FIX(1,0.21,0,0,DYBLOCK)COLOR00FFFF;超B:=L2_AMO(0,2)/10000.0;大B:=L2_AMO(1,2)/10000.0;中B:=L2_AMO(2,2)/10000.0;小B:=L2_AMO(3,2)/10000.0;超S:=L2_AMO(0,3)/10000.0;大S:=L2_AMO(1,3)/10000.0;中S:=L2_AMO(2,3)/10000.0;小S:=L2_AMO(3,3)/10000.0;TESTSKIP(NOT(超B OR 大B OR 中B OR 小B OR 超S OR 大S OR 中S OR 小S)!=0); 主力进:=(超B)+(大B),NODRAW;主力出:=(超S)+(大S),NODRAW;小散进:=(中B)+(小B),NODRAW;小散出:=(中S)+(小S),NODRAW;DAZHIV:=CONST(MAX(ABS(主力进),MAX(ABS(主力出),MAX(ABS(小散进),ABS(小散出))))),NODRAW;DRAWRECTREL(0,CONST(940-(ABS(主力进)*250/DAZHIV)),30,960,IF(CONST(主力进>0),RGB(255,0,0),RGB(23,125,255)));DRAWRECTREL(32,CONST(940-(ABS(主力出)*250/DAZHIV)),62,960,IF(CONST(主力出>0),RGB(23,125,255),RGB(255,0,0)));DRAWRECTREL(70,CONST(940-(ABS(小散进)*250/DAZHIV)),100,960,IF(CONST(小散进>0),RGB(255,0,0),RGB(23,125,255)));DRAWRECTREL(102,CONST(940-(ABS(小散出)*250/DAZHIV)),132,960,IF(CONST(小散出>0),RGB(23,125,255),RGB(255,0,0)));DRAWTEXT_FIX(CURRBARSCOUNT=1,0.0001,0.9,0,STRCAT('',CON2STR(主力进/10,0))),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.033,0.9,0,STRCAT('',CON2STR(主力出/10,0))),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.07,0.9,0,STRCAT('',CON2STR(小散进/10,0))),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.101,0.9,0,STRCAT('',CON2STR(小散出/10,0))),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.03,1,0,'(X10万元)'),COLOR00FFFF; DRAWTEXT_FIX(CURRBARSCOUNT=1,0,1,0,'主进出'),COLORCYAN;DRAWTEXT_FIX(CURRBARSCOUNT=1,0.09,1,0,'散进出'),COLORCYAN;主力买力度:=LARGEINTRDVOL*1000/VOL;主力卖力度:=LARGEOUTTRDVOL*1000/VOL;AAD:=CONST(MAX(ABS(主力买力度),ABS(主力卖力度)))*4,NODRAW; DRAWRECTREL(0,515,CONST(ABS(主力买力度)*500/AAD),568,IF(CONST(主力买力度)>0,RGB(255,0,0),RGB(0,50,0)));DRAWRECTREL(0,570,CONST(ABS(主力卖力度)*500/AAD),623,IF(CONST(主力卖力度)>0,RGB(0,50,0),RGB(255,0,0)));DRAWTEXT_FIX(1,0,0.524,0,STRCAT('主买力度:',CON2STR(主力买力度,0))),COLORYELLOW;DRAWTEXT_FIX(1,0,0.576,0,STRCAT('主卖力度:',CON2STR(主力卖力度,0))),COLORYELLOW;VAR111:=ZIG(3,13);STICKLINE((REF(VAR111,2) < REF(VAR111,1)) AND (VAR111 <REF(VAR111,1)),CLOSE,OPEN,3,0),COLOR66FF00;DRAWTEXT_FIX(STICKLINE((REF(VAR111,2) < REF(VAR111,1)) AND (VAR111 < REF(VAR111,1)),CLOSE,OPEN,5,0),0.00,0.11,0,''),COLOR00FF00,LINETHICK1;VAR100:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20)))); VAR200:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20)))); VAR300:=(100 - MA(((100 * (HHV(HIGH,5) - CLOSE)) / (HHV(HIGH,5) -LLV(LOW,5))),34));F:IF(CROSS(VAR200,MA(VAR300,5)),LOW *0.98,DRAWNULL),CROSSDOT,LINETHICK3,COLOREE00EE;年:MA(CLOSE,22),LINETHICK2,COLORWHITE;MAA5:MA(C,5),COLORFF00FF,LINETHICK2;MAA10:=MA(C,10);MAA30:MA(C,30),COLORRED;KS:IF(MAA10>MAA30,MAA10,MAA30),COLORBLUE;A3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;A4:=SMA(A3,3,1);A5:=SMA(A4,3,1);A6:=3*A4-2*A5;A7:=C-REF(C,1);A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);买:=LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2));DRAWTEXT(FILTER(买=1,5),LOW-0.05,'↖跟党走'),COLORYELLOW; STICKLINE(买,OPEN,CLOSE,2,0),COLORYELLOW;STICKLINE(ISLASTBAR,HHV(C,5)*0.95-0.01,HHV(C,5)*0.95,100,0),COLORWHITE; DRAWNUMBER(ISLASTBAR,HHV(C,5)*0.95-0.01,HHV(C,5)*0.95);。
通达信指标公式源码 主力趋势 中线主图
{开始---主力趋势指标}MTM:=C-REF(C,1);主力做多:=100*EMA(EMA(MTM,9),9)/EMA(EMA(ABS(MTM),9),9),COLORWHITE; 多空趋势线:=MA(主力做多,5),COLORYELLOW;能量:=(主力做多-0)*1,COLORBLACK;持仓:=能量, COLORSTICK;{结束}VAR1:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) -LLV(LOW,14))));VAR2:=(100 - ((90 * (HHV(HIGH,14) - CLOSE)) / (HHV(HIGH,14) -LLV(LOW,14))));VAR3:=(100 - MA(((100 * (HHV(HIGH,6) - CLOSE)) / (HHV(HIGH,6) - LLV(LOW,6))),34));DIR1:=ABS(CLOSE-REF(CLOSE,5));VIR1:=SUM(ABS(CLOSE-REF(CLOSE,1)),5);ER1:=DIR1/VIR1;CS1:=ER1*(0.8-2/8)+2/8;CQ1:=CS1*CS1;基线:EMA(DMA(CLOSE,CQ1),2) ,COLORWHITE;DIR2:=ABS(CLOSE-REF(CLOSE,10));VIR2:=SUM(ABS(CLOSE-REF(CLOSE,1)),10);ER2:=DIR2/VIR2;CS2:=ER2*(0.8-2/24)+2/24;CQ2:=CS2*CS2;观望:EMA(DMA(CLOSE,CQ2),2),COLORGREEN,LINETHICK2;高抛低吸:IF(观望/REF(观望,1)>0.997,观望,DRAWNULL),COLORYELLOW,LINETHICK2;持股:IF(观望/REF(观望,1)>1.001,观望,DRAWNULL),COLORRED,LINETHICK2; STICKLINE((VAR2 < MA(VAR3,6)) AND 主力做多>0,CLOSE,OPEN,3,1),COLOR008000;STICKLINE((VAR2 > MA(VAR3,6)) AND 主力做多>0,OPEN,CLOSE,3,1),COLORRED;STICKLINE(((OPEN > CLOSE) AND (VAR2 > MA(VAR3,6)) AND 主力做多>0),(OPEN * 0.998),(CLOSE * 1.0001),2.3,0),COLOR008000; STICKLINE(((OPEN < CLOSE) AND (VAR2 < MA(VAR3,6)) AND 主力做多>0),(CLOSE * 0.998),(OPEN * 1.002),2.3,0),COLORRED;STICKLINE(((OPEN > CLOSE) AND (VAR2 < MA(VAR3,6)) AND 主力做多>0),CLOSE,OPEN,2.3,0),COLORCYAN;{主图赋值结束}PT:=REF(H,1)-REF(L,1);CDP:=(REF(H,1)+REF(L,1)+REF(C,1)*2)/4;AH:=CDP+PT;AL:=CDP-PT;NH:=CDP*2-REF(L,1);NL:=CDP*2-REF(H,1);强:=IF(AH>REF(C,1)*1.1 ,REF(C,1)*1.1,AH),COLORMAGENTA;阻:=IF(NH>强,(强-CDP)*0.618+CDP ,NH),COLORCYAN;M:=IF(AL<REF(C,1)/1.1,REF(C,1)/1.1,AL);撑:=IF(NL<M,CDP-(CDP-M)*0.618 ,NL),COLORRED;底:=IF(AL<REF(C,1)/1.1,REF(C,1)/1.1 ,AL),COLORGREEN;{开始---主散分布图指标}机构持仓:=EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3),COLO RFF00FF;指数趋势:=EMA(1250*(INDEXC-LLV(INDEXL,34))/HHV(INDEXH,34)-LLV(INDEXL,34) ,3),COLORYELLOW,NODRAW;主力:=WINNER(C)*100,COLORRED;散户:= (WINNER(C*1.1)-WINNER(C*0.9))*100,COLORGREEN;强势:=(机构持仓+主力+散户)/2,COLORFF6699;强弱分界:=80,COLOR00FFFF;{结束}{开始----资金动向指标}PJJ:=DMA((H + L + C * 2) / 4,0.9);JJ:=REF(EMA(PJJ,3),1);QJJ:=VOL / ((H - L) * 2 - ABS(C - O));XVL:=IF(C > O,QJJ * (H - L),IF(C < O,QJJ * (H - O + (C - L)),VOL / 2)) +IF(C > O,0 - QJJ * (H - C + (O - L)),IF(C < O,0 - QJJ * (H - L),0 - VOL / 2)); ZLL:=VOL / CAPITAL;HSL1:=IF(ZLL > 10,10,ZLL);HSL:=XVL / 20 / 1.15;攻击流量:=HSL * 0.55 + REF(HSL,1) * 0.33 + REF(HSL,2) * 0.22;GJJ:=EMA(攻击流量,8);LLJX:=EMA(攻击流量,3);流量:=LLJX,COLORC875B7,NODRAW;流量基线:=GJJ,COLOR00BBBB;ZJLL:=REF(LLJX,1);QZJJ:=(((LLJX - ZJLL) / ZJLL) * 100);流量幅%:=IF(((LLJX > 0) AND (ZJLL < 0)),ABS(QZJJ),IF((((LLJX < 0) AND (ZJLL < 0)) AND (LLJX < ZJLL)),(0 - QZJJ),QZJJ))COLORWHITE,NODRAW;大单:=HSL / 1000,COLOR9B37FF,NODRAW;周流量:=SUM(LLJX,5),COLORFFBFDF,NODRAW;BB:=REF(周流量,1);ZQZJJ:=(周流量-BB)/BB*100;周幅%:=IF(周流量>0 AND BB<0,ABS(ZQZJJ),IF(周流量<0 AND BB<0 AND 周流量<BB,-ZQZJJ,ZQZJJ))COLORWHITE,NODRAW;{结束}{反转}VARZ1:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-RE F(CLOSE,1))),25);VARZ2:=HIGH-REF(HIGH,1);VARZ3:=REF(LOW,1)-LOW;VARZ4:=SUM(IF(VARZ2>0 AND VARZ2>VARZ3,VARZ2,0),25);VARZ5:=SUM(IF(VARZ3>0 AND VARZ3>VARZ2,VARZ3,0),25);VARZ6:=VARZ4*100/VARZ1;VARZ7:=VARZ5*100/VARZ1;VARZ8:=MA(ABS(VARZ7-VARZ6)/(VARZ7+VARZ6)*100,15);VARZ9:=(VARZ8+REF(VARZ8,15))/2;A:=(VARZ7>VARZ6 AND VARZ7>25 AND VARZ6<25);B:=ZIG(3,50/5)*100,COLORWHITE;G:=MA(B,2),COLORYELLOW;D:=CROSS(B,G)*1000,COLORRED;W:=CROSS(G,B)*1000,COLORBLUE;E:=REF(INDEXC,1);F:=SMA(MAX(INDEXC-E,0),3,1)/SMA(ABS(INDEXC-E),3,1);VARZ10:=F AND F<8;VARZ11:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;VARZ12:=SMA(VARZ11,3,1);VARZ13:=SMA(VARZ12,3,1);VARZ14:=VARZ13 AND VARZ13<20;MM:=A AND D AND VARZ10 AND VARZ14 ;XXX:=DRAWTEXT(W=1000,B*1.05,'卖' ),COLOR00FF00;XXY:=DRAWTEXT(D=1000,B*1.05,'买'),COLORRED;底1:=STICKLINE(D=1000 AND B*1.05,0,20,2,0),COLORRED;顶1:=STICKLINE(W=1000 AND B*1.05,0,20,2,0),COLORGREEN;{反转}日线:=(MA(CLOSE,3)+MA(CLOSE,5)+MA(CLOSE,10)+MA(CLOSE,20))/4;平均线:=MA(日线,2);{DRAWICON(CROSS(日线,平均线),平均线,1);DRAWICON(CROSS(平均线,日线),平均线,2);}{综合选股输出}顶部:=DRAWTEXT( 顶1 ,(HIGH+(HIGH*0.10)),'顶')COLORGREEN;底部:=DRAWTEXT( 底1 ,(LOW - (LOW*0.10)),'底')COLORRED;VAR11:=(2*CLOSE+HIGH+LOW)/4;VAR22:=EXPMA(EXPMA(EXPMA(VAR11,5),5),5);J:= (VAR22-REF(VAR22,1))/REF(VAR22,1)*100, COLORSTICK;多空:= MA(J,3);多头:= MA(J,1);{STICKLINE( UPNDAY(J,1)AND J>0,J ,0,1,0)COLORRED;STICKLINE( UPNDAY(J,1)AND J>0,J ,0,0.8,0)COLORLIRED;}买进:DRAWICON(CROSS(主力做多,0) ,(LOW - (LOW*0.06)),3);卖出:DRAWICON(CROSS(0,主力做多),(HIGH+ (HIGH*0.06)),4);风险:DRAWICON( DOWNNDAY(机构持仓,1) AND (CROSS(多空趋势线,主力做多) AND 主力做多>0) OR( 顶1 AND 主力做多>0),(HIGH+ (HIGH*0.06)),6);。
【指标公式源码下载】通达信看盘极品主图指标公式【多线】
通达信看盘极品主图指标公式【多线】MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;取舍线: (20*MID+19*REF(MID,1)+18*REF(MID,2)+17*REF(MID,3)+16*REF(MID,4)+15*REF(MI D,5)+14*REF(MID,6)+13*REF(MID,7)+12*REF(MID,8)+11*REF(MID,9)+10*REF(MID,10) +9*REF(MID,11)+8*REF(MID,12)+7*REF(MID,13)+6*REF(MID,14)+5*REF(MID,15)+4*R EF(MID,16)+3*REF(MID,17)+2*REF(MID,18)+REF(MID,20))/210,LINETHICK1,COLORY ELLOW;生命线:MA(取舍线,6),LINETHICK1,COLORRED;五日线:MA(CLOSE,5),POINTDOT,COLORLIBLUE;水平面:MA(CLOSE,60),CIRCLEDOT,COLORLIMAGENTA;MA1:=MA(CLOSE,5);MA2:=MA(CLOSE,10);MA3:=MA(CLOSE,30);MA4:=MA(CLOSE,60);WYA001:=(2*CLOSE+HIGH+LOW)/4;WYA002:=EMA(WYA001,4);WYA003:=EMA(WYA002,4);WYA004:=EMA(WYA003,4);WYA柱:=(WYA004-REF(WYA004,1))/REF(WYA004,1)*100;WYA线1:=MA(WYA柱,2);WYA线2:=MA(WYA柱,1);WY分时1线:=MA(CLOSE,1);WY分时21线:=MA(CLOSE,21);DRAWICON(WYA线1>0.25 AND WYA线2>0.25 AND CROSS(WYA线1,WYA线2),HIGH*1.0128,6);DRAWICON(WYA线1<0 AND WYA线2<0 AND CROSS(WYA线1,WYA线2),HIGH*1.0128,6);DRAWICON( CROSS(WY分时21线,WY分时1线),HIGH*1.0128,6) ;DRAWICON(WYA线1<-0.25 AND WYA线2<-0.25 AND CROSS(WYA线2,WYA线1),LOW*0.99,5);DRAWICON(WYA线1>0 AND WYA线2>0 AND CROSS(WYA线2,WYA线1),LOW*0.99,5),COLORYELLOW;DRAWICON(CROSS(WY分时1线,WY分时21线),LOW*0.99,5),COLORYELLOW;。
通达信指标公式源码 操盘均线 主图源码
网1:=EXPMA(C,5),COLORYELLOW;网2:=EXPMA(网1,2);网3:=EXPMA(网2,2);网33:EXPMA(CLOSE,33),COLORFF00FF,LINETHICK3;TJ1A:IF(网1>网2,网1,网2),COLORLICYAN;TJ2A:IF(网1>网3,网1,网3),COLORGREEN;TJ3A:网1,COLORYELLOW,LINETHICK2;{QS}网A:=EXPMA(CLOSE,5),COLORWHITE;网B:=EXPMA(CLOSE,33),COLORFF00FF,LINETHICK3;IF(网B<REF(网B,1),网B,DRAWNULL),COLOR00FF00,LINETHICK3;IF(网B<REF(网A,1),网A,DRAWNULL),COLORWHITE,LINETHICK1;IF(网1<REF(网B,1),网A,DRAWNULL),COLORGREEN,LINETHICK1;{HJ}HH:=CONST(HHV(H,160));LL:=CONST(LLV(L,160));{160可改成你习惯锁定的日K线数}HL1:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.76,0.04)); HL2:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.80,0.08)); HL3:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.84,0.12)); HL4:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.88,0.16)); HL5:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.92,0.20)); HL6:=CONST(IF(CONST(REF(MA(C,10),10))>CONST((HH+LL)/2),0.96,0.24)); DRAWTEXT_FIX(1,0.00,0,0,'所属行业:')COLOR0080FF;DRAWTEXT_FIX(1,0.07,0,0,HYBLOCK)COLOR0080FF;DRAWTEXT_FIX(1,0.14,0,0,'所属地区:')COLOR00FFFF;DRAWTEXT_FIX(1,0.21,0,0,DYBLOCK)COLOR00FFFF;DRAWTEXT_FIX(1,0.00,0.04,0,'主题投资:')COLOR0000FF;DRAWTEXT_FIX(1,0.07,0.04,0,EXTERNSTR(0,1))COLOR0000FF; {生成数据时第1项输1与这里1一致,描述部分输"主题投资"}DRAWTEXT_FIX(1,0.00,0.08,0,'主营业务:')COLORFF00FF;DRAWTEXT_FIX(1,0.07,0.08,0,EXTERNSTR(0,2))COLORFF00FF; {生成数据时第1项输2与这里2一致,描述部分输"主营业务"}DRAWTEXT_FIX(1,0.00,0.12,0,'出千概念:')COLORFF88FF;DRAWTEXT_FIX(1,0.07,0.12,0,EXTERNSTR(0,3))COLORFF88FF; {生成数据时第1项输3与这里3一致,描述部分输"出千概念"}日:=50;昨前:=3;高1:=REF(HHV(H,日),昨前);低1:=REF(LLV(L,日),昨前);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;L1:=低1+(高1-低1)*1.191;L2:=低1+(高1-低1)*1.382;L3:=低1+(高1-低1)*1.5;L4:=低1+(高1-低1)*1.618;L5:=低1+(高1-低1)*1.809;短压:REFDATE(高1,DATE),COLORGREEN,LINETHICK1;支撑19.1%:REFDATE(H1,DATE),COLORYELLOW;支撑38.2%:REFDATE(H2,DATE),COLORMAGENTA;支撑50%:REFDATE(H3,DATE),COLORLIGRAY;支撑61.8%:REFDATE(H4,DATE),COLORWHITE,LINETHICK1;支撑80.9%:REFDATE(H5,DATE),COLORWHITE;低:REFDATE(低1,DATE),COLORWHITE;阻力119.1%:REFDATE(L1,DATE),COLORYELLOW;阻力138.2%:REFDATE(L2,DATE),COLORMAGENTA;阻力150%:REFDATE(L3,DATE),COLORLIGRAY;阻力161.8%:REFDATE(L4,DATE),COLORRED;阻力180.9%:REFDATE(L5,DATE),COLORWHITE;{三线金叉显示钱袋子的源码}DIFF1:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA1:=EMA(DIFF1,9);MACDD:=CROSS(DIFF1,DEA1);均线1:=CROSS(MA(C,5),MA(C,10));量线1:=CROSS(MA(V,5),MA(V,10));DRAWICON(MACDD AND 均线1 AND 量线1,L-0.20,25);{同时金叉显示25号图标};DRAWICON( 均线1 AND 量线1,L-0.20,1);DRAWTEXT(量线1,L-0.25,'量'),COLORYELLOW;总额:=AMOUNT;买:=IF(O=C AND(C-REF(C,1))/REF(C,1)*100>9.8,AMOUNT,AMOUNT/((H-L)*2-ABS(O-C))*(C-L ));买%:=买/AMOUNT*100;流入:=AMOUNT*买%/10000000000;流出:=AMOUNT/100000000-流入;净流:=(流入-流出);总额3:=SUM(AMOUNT,3);流入3:=SUM(流入,3);流出3:=SUM(流出,3);净流3:=SUM(流入-流出,3);总额5:=SUM(AMOUNT,5);流入5:=SUM(流入,5);流出5:=SUM(流出,5);净流5:=SUM(流入-流出,5);总额10:=SUM(AMOUNT,10);流入10:=SUM(流入,10);流出10:=SUM(流出,10);净流10:=SUM(流入-流出,10);画:=CONST(FINDHIGH(总额10,0,190,1));DRAWTEXT_FIX(1,0.71,0.07,0,'净流(亿):'),COLORMAGENTA,LINETHICK1; DRAWTEXT_FIX(1,0.78,0.05,0,'1日'),COLORMAGENTA,LINETHICK1; DRAWTEXT_FIX(1,0.83,0.05,0,'3日'),COLORMAGENTA,LINETHICK1; DRAWTEXT_FIX(1,0.88,0.05,0,'5日'),COLORMAGENTA,LINETHICK1; DRAWTEXT_FIX(1,0.93,0.05,0,'10日'),COLORMAGENTA,LINETHICK1; DRAWNUMBER_FIX(1,0.78,0.10,0,CONST((净流))),COLORYELLOW; DRAWNUMBER_FIX(1,0.83,0.10,0,CONST((净流3))),COLORYELLOW; DRAWNUMBER_FIX(1,0.88,0.10,0,CONST((净流5))),COLORYELLOW; DRAWNUMBER_FIX(1,0.93,0.10,0,CONST((净流10))),COLORYELLOW;。
通达信指标公式源码 精准的K线主图公式源码
BBI:(MA(C,3)+MA(C,6)+MA(C,12)+MA(C,24))/4;MA(C,N1);MA(C,N2);MA(C,N3),LINETHICK2;MA(C,N4),COLORLIRED,LINETHICK2; 买线:=EMA(C,2);卖线:=EMA(SLOPE(C,21)*20+C,42);中:=(MA(CLOSE,30)+MA(C,72))/2,COLOR999999,LINETHICK0;HLY1:=中*1.1,POINTDOT,COLOR999999,LINETHICK0;VAR61:=(CLOSE*2+HIGH+LOW)/4;VAR62:=EMA(VAR61,3);VAR63:=EMA(VAR62,6);L1:=EMA(VAR61,3),LINETHICK0;L2:=EMA(VAR62,4),LINETHICK0;L3:=EMA(VAR63,5),LINETHICK0;{正常上涨}STICKLINE(C>=O,H,L,0,0 ),COLOR0000FF; {红色}STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,3.2,0) ,COLOR000055;STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,2.6,0) ,COLOR000077;STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,1.9,0) ,COLOR000099;STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,1.1,0) ,COLOR0000BB;STICKLINE(CLOSE>=OPEN,CLOSE,OPEN,0.2,0) ,COLOR0000FF; {STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.2,0) ,COLOR0000EE;STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.4,0) ,COLOR0000FF;}{正常下跌}STICKLINE(OPEN>=CLOSE,H,L,0,0 ),COLORFFFF00; {天蓝}STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,3.2,0 ),COLORFF5500;STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,2.6,0 ),COLORFF7700;STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1.9,0 ),COLORFF9900;STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1.1,0 ),COLORFFBB00;STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0.2,0 ),COLORFFDD00; {STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,1.2,0 ),COLORFFEE00; STICKLINE(OPEN>=CLOSE ,CLOSE ,OPEN,0.4,0 ),COLORFFFF00;}{整理下跌区}{STICKLINE(L1<L2,H,LOW,0 ,0 ),COLORFFFFFF;{灰色}{STICKLINE(L1<L2,CLOSE ,OPEN,3.0,0 ),COLOR555555;STICKLINE(L1<L2,CLOSE ,OPEN,2.5,0 ),COLOR777777;STICKLINE(L1<L2,CLOSE ,OPEN,1.9,0 ),COLOR999999;STICKLINE(L1<L2,CLOSE ,OPEN,1.2,0 ),COLORBBBBBB;STICKLINE(L1<L2,CLOSE ,OPEN,0.4,0 ),COLORDDDDDD;}{STICKLINE(L1<L2,CLOSE ,OPEN,3,0 ),COLORFFEE00;STICKLINE(L1<L2,CLOSE ,OPEN,2,0 ),COLORFFFF00;}{下跌开始}VAR44:=REF(L1,1)>L1 AND L1>L2;STICKLINE(VAR44,H,LOW,0,0 ),COLORFF0000; {蓝色}{STICKLINE(VAR44,CLOSE,OPEN,3.0,0) ,COLOR550000;STICKLINE(VAR44,CLOSE,OPEN,2.5,0) ,COLOR660000;}STICKLINE(VAR44,CLOSE,OPEN,3.2,0) ,COLOR660000;STICKLINE(VAR44,CLOSE,OPEN,2.6,0) ,COLORAA0000;STICKLINE(VAR44,CLOSE,OPEN,1.9,0) ,COLOREE1100;STICKLINE(VAR44,CLOSE,OPEN,1.1,0) ,COLORFF3300;STICKLINE(VAR44,CLOSE,OPEN,0.2,0) ,COLORFF5500;{顶部钝化区}STICKLINE((CLOSE >= HLY1),H,LOW,0 ,0),COLORFF00FF;{粉色}STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,3.2,0),COLOR770077;STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,2.6,0),COLORAA00AA;STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,1.9,0),COLORDD00DD;STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,1.1,0),COLORFF22FF;STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,0.2,0),COLORFF66FF;{STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,3,0),COLORFFDDFF;STICKLINE((CLOSE >= HLY1),CLOSE ,OPEN,2,0),COLORFFEEFF;}{单边下跌}STICKLINE(买线<卖线,H,LOW,0,0 ),COLOR00FF00; {绿色}STICKLINE(买线<卖线,CLOSE ,OPEN,3.2,0),COLOR004400;STICKLINE(买线<卖线,CLOSE ,OPEN,2.6,0),COLOR005500;STICKLINE(买线<卖线,CLOSE ,OPEN,1.9,0),COLOR007700;STICKLINE(买线<卖线,CLOSE ,OPEN,1.1,0),COLOR009900;STICKLINE(买线<卖线,CLOSE ,OPEN,0.2,0),COLOR00CC00;{STICKLINE(买线<卖线,CLOSE ,OPEN,3,0),COLOR00DD00;STICKLINE(买线<卖线,CLOSE ,OPEN,2,0),COLOR00FF00;}{向上变盘}STICKLINE(CROSS(买线,卖线),H,L,0,0),COLOR0033DD;{橘黄}STICKLINE(CROSS(买线,卖线),C,OPEN,3.2,0),COLOR000077;STICKLINE(CROSS(买线,卖线),C,OPEN,2.6,0),COLOR003399;STICKLINE(CROSS(买线,卖线),C,OPEN,1.9,0),COLOR0033DD;STICKLINE(CROSS(买线,卖线),C,OPEN,1.1,0),COLOR0055FF;STICKLINE(CROSS(买线,卖线),C,OPEN,0.2,0),COLOR0099FF;{向下变盘}STICKLINE(CROSS(卖线,买线),H,L,0,0),COLOR00FFFF;{黄色}STICKLINE(CROSS(卖线,买线),C,OPEN,3.2,0),COLOR008888;STICKLINE(CROSS(卖线,买线),C,OPEN,2.6,0),COLOR00AAAA;STICKLINE(CROSS(卖线,买线),C,OPEN,1.9,0),COLOR00CCCC;STICKLINE(CROSS(卖线,买线),C,OPEN,1.1,0),COLOR00EEEE;STICKLINE(CROSS(卖线,买线),C,OPEN,0.2,0),COLOR44FFFF;N1,N2,N3,N4:分别为:5,10,30,60。
精品主图 精准K线买卖点提示通达信指标公式源码
此主图能比较好地提示K线买卖点,每条K线通过用颜色来反映当天K线的情况,对新手来说,是一个很好的主图,高手飘过。
指标只是辅助,具体交易要结合大盘和个股情况来看。
黄线1:EMA((O+C)/2,10),COLORGREEN,LINETHICK2;黄线2:EMA((O+C)/2,8.5),POINTDOT,COLORGREEN,LINETHICK3;黄线3:EMA((O+C)/2,6),POINTDOT,COLORGREEN,LINETHICK3;黄线4:EMA((O+C)/2,4.5),POINTDOT,COLORGREEN,LINETHICK3;黄线5:EMA((L+H)/2,3),COLORGREEN;IF(黄线1>=REF(黄线1,0),黄线1,DRAWNULL),COLORRED,LINETHICK2;IF(黄线1<=REF(黄线1,1),黄线1,DRAWNULL),COLORGREEN,LINETHICK2;IF(黄线2>=REF(黄线2,1),黄线2,DRAWNULL),POINTDOT,COLORRED,LINETHICK1;IF(黄线2<=REF(黄线2,1),黄线2,DRAWNULL),POINTDOT,COLORGREEN,LINETHICK1; IF(黄线3>=REF(黄线3,1),黄线3,DRAWNULL),POINTDOT,COLORRED,LINETHICK1;IF(黄线3<=REF(黄线3,1),黄线3,DRAWNULL),POINTDOT,COLORGREEN,LINETHICK1; IF(黄线4>=REF(黄线4,1),黄线4,DRAWNULL),POINTDOT,COLORRED,LINETHICK1;IF(黄线4<=REF(黄线4,1),黄线4,DRAWNULL),POINTDOT,COLORGREEN,LINETHICK1; IF(黄线5>=REF(黄线5,1),黄线5,DRAWNULL),COLORRED,LINETHICK1;IF(黄线5<=REF(黄线5,1),黄线5,DRAWNULL),COLORGREEN,LINETHICK1;强势区:=IF((EVERY(黄线1>=REF(黄线1,1),1)),5,0)COLOR0000FF,LINETHICK3;买进价:=((C-REF(黄线5,1))/8+黄线5)*1.004;买进条件:=CROSS(C,买进价) AND 买进价>REF(买进价,1);白K买进:IF(买进条件,L,H),COLORWHITE,POINTDOT;STICKLINE(买进条件,H,L,0,1),COLORWHITE,LINETHICK2;STICKLINE(买进条件,O,C,2,1),COLORWHITE,LINETHICK2;加码价:=((C-REF(黄线1,1))/20+黄线1)*1.004;加码条件:=CROSS(C,加码价) AND 加码价>REF(加码价,1);黄K加码:IF(加码条件,L,H),COLORYELLOW,POINTDOT;STICKLINE(加码条件,H,L,0,1),COLORYELLOW,LINETHICK2;STICKLINE(加码条件,O,C,2,1),COLORYELLOW,LINETHICK2;KPD1:=EMA(EMA(CLOSE,9),9);KPD2:=100*WINNER(CLOSE*0.95);L1:=(EMA(CLOSE,3) - EMA(CLOSE,13));L2:=EMA(L1,9);L3:=BARSLAST(CROSS(L1,L2));L4:=REF(L3,L3+1);L5:=L2;ROC:=(CLOSE-REF(CLOSE,21))/REF(CLOSE,21)*100;AC:=AMOUNT/(VOL);YY:=MA(AC,13);LLL:=(C-YY)/YY*100;MIDC:=MA(CLOSE,22);UPPERC:=MIDC+2*STD(C,22);LOWERC:=MIDC-2*STD(C,22);BBA:=(C-LOWERC)/(UPPERC-LOWERC);LIFENGCYC:=(REF(LLL,1)<-15 AND REF(BBA,1)<0 AND LLL>REF(LLL,1));控盘:=(KPD1-REF(KPD1,1))/REF(KPD1,1)*1000;启动:STICKLINE(IF(CROSS(控盘,0),10,0),O,C,0.5,0),COLOR00FFFF;拐点:STICKLINE(FILTER(CROSS(ROC,0),6),O,C,0.5,0),COLORFF8080;变盘:STICKLINE(CROSS(L1,L2) AND L5,O,C,0.5,0),COLOR0080FF;DRAWTEXT_FIX(1,0.0,0,0,'细K线颜色提示:黄-启动桔黄-变盘紫兰-拐点红-买点// 粗K线颜色提示:橙黄-买入品红-卖出//白K买进,黄K加码//∠45升次日高开抱,低开出'),COLOR00FFFF;MID:=(3*CLOSE+LOW+OPEN+HIGH)/6;VAR111:=EMA(CLOSE,4)-EMA(CLOSE,13);AA222:=VAR111>=REF(VAR111,1);BB222:=VAR111<REF(VAR111,1);买入:DRAWICON(CROSS(AA222,BB222),L*0.994,38);卖出:DRAWICON(CROSS(BB222,AA222),H*1.004,39);JRH:=HHV(C,2);JRL:=LLV(C,2);YTSL:=(3*CLOSE+LOW+OPEN+HIGH)/6;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)); 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)); 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);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);{好}短买:VAR19,COLOR33AACC,NODRAW;品红离场:VAR1A,COLORFF99FF,NODRAW;急速超跌:(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100<-14,COLORFFFFFF,NODRAW;CO:=(C-O);STICKLINE(急速超跌,O,C-CO/2,2.8,0),COLOR555555;STICKLINE(急速超跌,O,C-CO/2,2,0),COLOR888888;STICKLINE(急速超跌,O,C-CO/2,1.5,0),COLORAAAAAA;STICKLINE(急速超跌,O,C-CO/2,1,0),COLORCCCCCC;STICKLINE(急速超跌,O,C-CO/2,0.5,0),COLOREEEEEE;STICKLINE(短买,O,O+CO/3,2,0),COLOR335555;STICKLINE(短买,O,O+CO/3,2,0),COLOR338888;STICKLINE(短买,O,O+CO/3,1.5,0),COLOR33AAAA;STICKLINE(短买,O,O+CO/3,1,0),COLOR33CCCC;STICKLINE(短买,O,O+CO/3,0,0),COLOR33EEEE;STICKLINE(品红离场,O,O+CO/3,2,0),COLOR550055;STICKLINE(品红离场,O,O+CO/3,0.1,0),COLOR880088;STICKLINE(品红离场,O,O+CO/3,1.5,0),COLORAA00AA;STICKLINE(品红离场,O,O+CO/3,1,0),COLORCC00CC;STICKLINE(品红离场,O,O+CO/3,0.5,0),COLOREE00EE;X1:=(C+L+H)/3;BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;EMA8:=EMA(C,8);DRAWTEXT(FILTER(BB13>1 AND EMA(X1,13)>REF(EMA(X1,8),1),10),EMA8,'★∠45升'),COLORLIBLUE;XXS:=MA(LOW,5)*(1-5/100);XXS1:=MA(HIGH,5)*(1+5/100);DRAWTEXT(CROSS(XXS1,C),L*0.98,'←开逃'),COLORWHITE;DDDD:=CROSS(C,XXS1);DRAWTEXT(DDDD,L*0.98,'←明走'),COLORYELLOW;。
通达信指标公式源码 好用分时突破指标
均线:IF(BETWEEN(C/(SUM(AMOUNT,0)/SUM(VOL*100,0)),1.05,0.95)=0,MA(C,0),(SUM(AMOUNT,0)/SUM(VOL*100,0))),COLORYELLOW, LINETHICK1;均线H:=(均线*1.007 ),COLORLICYAN;均线L:=(均线/1.005 ),COLORWHITE;均线横盘:=C<均线H AND C>均线L;放量:=SUM(VOL,6)>REF(MA(VOL,30),1)*10;横盘:=((HHV(CLOSE,BARSCOUNT(CLOSE))-LLV(CLOSE,BARSCOUNT(CLOSE)))/ CLOSE)<1;收:DYNAINFO( 3),COLORWHITE,LINETHICK2;横涨:=横盘AND 放量AND (C>均线H);横跌:=横盘AND 放量AND CROSS(均线L,C) ;突破:=FILTER(横涨,100);下破:=FILTER(横跌,50) ;DRAWTEXT(突破,C*1.01,'突破'),COLORWHITE;现价:C,COLORWHITE;AA:=MA((2*CLOSE+HIGH+LOW)/4,5);谷1:AA*102/100,COLORMAGENTA;BGTYU:=IF(DATE<=1130107,1,0);GHYJKU:=BETWEEN((DCLOSE*BGTYU)/(SUM(AMOUNT,BARSCOUNT((DCLOS E*BGTYU)))/SUM(VOL*100,BARSCOUNT((DCLOSE*BGTYU)))),1.05,0.95); VBNH:=IF(GHYJKU=0,MA((DCLOSE*BGTYU),BARSCOUNT((DCLOSE*BGTYU)) ),(SUM(AMOUNT,BARSCOUNT((DCLOSE*BGTYU)))/SUM(VOL*100,BARSCOUN T((DCLOSE*BGTYU)))));DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),120),1.0029),现价*0.98,'买进'),COLORWHITE;DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),120),1.0029),现价*0.99,1);DRAWTEXT(CROSS(EXPMA((DCLOSE/VBNH),60),EXPMA((DCLOSE/V BNH),120)),现价,'主穿散')COLORWHITE;DRAWICON(CROSS(EXPMA((DCLOSE/VBNH),120),1.004),现价*0.98,55),COLORWHITE;MA30:=EMA(CLOSE,30);强弱界定:=EMA(CLOSE,900);DRAWICON(CROSS(MA30,强弱界定),现价*0.98,34);VAR1:=(EMA(CLOSE,30)+EMA(CLOSE,72))/2;VAR2:=(EMA(VOL,10)+EMA(VOL,32))/2;VAR3:=(VAR1+VAR2)/2;VAR4:=EMA(VAR3,30);VAR5:=EMA(VAR3,60);VAR6:=EVERY(VAR1>REF(VAR1,1),5) AND EVERY(VAR4>REF(VAR4,1),5);趋势关注:=IF(CROSS(VAR1,EMA(VAR1,60)) ANDVAR6,1,0);DRAWBAND(VAR1*0.96,RGB(150,30,30),EMA(VAR1,60)*0.96,RGB( 0,110,30));DRAWTEXT(趋势关注=1,C*0.97,'转折'),COLORWHITE;DIFF:=EMA(DCLOSE,12)-EMA(DCLOSE,26);DEA:=EMA(DIFF,9),COLORFFFF00;MACD:=(DIFF-DEA)*2;A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF> REF(DIFF,A1+1) AND CROSS(DIFF,DEA);DRAWTEXT(底背离,L*0.98,'↖底背'),COLORYELLOW; GDK:=(SMA(C,2,1)-SMA(C,6,1))*8;ZSR:DYNAINFO( 3)*0.96;STICKLINE(GDK>0,ZSR,ZSR+GDK,0,0) ,COLORRED;STICKLINE(GDK<=0,ZSR,ZSR+GDK,0,0) ,COLORGREEN;STICKLINE(GDK>0 ,ZSR+GDK*0.05,ZSR+GDK*0.15,0,0) ,COLORRED; STICKLINE(GDK>0 ,ZSR+GDK*0.2,ZSR+GDK*0.35,0,0) ,COLORRED; STICKLINE(GDK>0 ,ZSR+GDK*0.4,ZSR+GDK*0.55,0,0) ,COLORRED; STICKLINE(GDK>0 ,ZSR+GDK*0.6,ZSR+GDK*0.75,0,0) ,COLORRED; STICKLINE(GDK>0 ,ZSR+GDK*0.8,ZSR+GDK*0.95,0,0) ,COLORRED; STICKLINE(GDK>0 ,ZSR+GDK*0.86,ZSR+GDK*0.999,0,0) ,COLORRED; STICKLINE(GDK<=0 ,(ZSR+GDK*0.05),(ZSR+GDK*0.15),0,0) ,COLORGREEN; STICKLINE(GDK<=0 ,(ZSR+GDK*0.2),(ZSR+GDK*0.35),0,0) ,COLORGREEN; STICKLINE(GDK<=0 ,(ZSR+GDK*0.4),(ZSR+GDK*0.55),0,0),COLORGREEN; STICKLINE(GDK<=0 ,(ZSR+GDK*0.6),(ZSR+GDK*0.75),0,0) ,COLORGREEN; STICKLINE(GDK<=0 ,(ZSR+GDK*0.8),(ZSR+GDK*0.95),0,0) ,COLORGREEN; STICKLINE(GDK<=0 ,(ZSR+GDK*0.86),(ZSR+GDK*0.999),0,0) ,COLORGREE N;均价:DYNAINFO(11),COLORGREEN,DOTLINE;神奇:=HHV(MA(H,13),45),COLORGREEN,LINETHICK4;奇特:=LLV(MA(H,13),1),COLORWHITE;STICKLINE(神奇=奇特,DYNAINFO( 3)*0.935,DYNAINFO( 3)*0.938,2,1),COLORMAGENTA;MA25:= EMA(CLOSE,25);牛熊分水岭:=EMA(CLOSE,905);STICKLINE((MA25 > 牛熊分水岭),DYNAINFO( 3)*0.925,DYNAINFO( 3)*0.928,4,0),COLORRED; 均线2:=IF(BETWEEN(C/(SUM(AMOUNT,0)/SUM(VOL*100,0)),1.05,0.95)=0,MA(C,0),(SUM(AMOUNT,0)/SUM(VOL*100,0))),COLORYELLOW; 均线H1:=(均线2*1.005 ),COLORFF6600;均线L1:=(均线2/1.002 ),COLOR00FF00;均线横盘1:=C<均线H1 AND C>均线L1;STICKLINE(均线横盘1,DYNAINFO( 3)*0.921,DYNAINFO( 3)*0.923,3,0),COLORYELLOW;。
通达信指标公式源码黄金分割+单阳不破+黄金均线主图(源码 主图)
用法: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;。
通达信 指标公式源码大全
【通晓信】魔鬼操盘(主图)指标公式源码均5:MA(CLOSE,5) COLORYELLOW;均10:MA(CLOSE,10)COLORGREEN;均30: MA(CLOSE,30) COLORMAGENTA ;均60: MA(CLOSE, 60) COLORRED POINTDOT LINETHICK3;均250: MA(CLOSE, 250) COLORBLUE LINETHICK2 ;魔鬼通道上:均30 + 2*STD(CLOSE,60) COLORYELLOW POINTDOT LINETHICK2 ;魔鬼通道下:均30 2*STD(CLOSE,60) COLORYELLOW POINTDOT LINETHICK2;VAR1:=(CLOSELLV(LOW,9))/(HHV(HIGH,9)LLV(LOW,9))*100;VAR2:=SMA(VAR1,3,1);VAR3:=SMA(VAR2,3,1);VAR4:=VAR1*1.05;VAR5:=MA(CLOSE,5);VAR6:=(HHV(HIGH,36)CLOSE)/(HHV(HIGH,36)LLV(LOW,36))*100; VAR7:=SMA(VAR6,5,1);VAR8:=VOL>REF(VOL,1);VAR9:=MA(VOL/CAPITAL,30)*MA(VOL,60)/10000+MA(CLOSE,30);【通晓信】平均价钱(主图)指标公式源码A:=(3*C+H+L+O)/6;XJ:=(A+0.618*REF(A,1)+0.382*REF(A,2)+0.236*REF(A,3)+0.146 *REF(A,4))/2.382;YCZXH:=(MA(HHV(A,2),5)+MA(HHV(A,2),13)+MA(HHV(A,2),21)+MA (HHV(A,2),32))/4;YCZXL:=(MA(LLV(A,2),5)+MA(LLV(A,2),13)+MA(LLV(A,2),21)+MA (LLV(A,2),32))/4;SMH:EMA(YCZXH,21),COLOR004000;SML:EMA(YCZXL,21),COLOR004000;SMJ:(SML+SMH)/2,COLOR004000;PJ:=(10*A+9*REF(A,1)+8*REF(A,2)+7*REF(A,3)+6*REF(A,4)+5*R EF(A,5)+4*REF(A,6)+3*REF(A,7)+2*REF(A,8)+REF(A,9))/55;A1:=EMA(PJ,3),COLOR004000;A2:=EMA(PJ,5),COLOR004000;A3:=EMA(PJ,7),COLOR004000;A4:=EMA(PJ,9),COLOR004000;A5:=EMA(PJ,11),COLOR004000;LX:=REF(XJ,1);ZD:=(SMA(MAX(XJLX,0),5,1)/SMA(ABS(XJLX),5,1))*100;KX1:=(CLOSE>=OPEN) AND ZD>=50;KX2:=(CLOSE<OPEN) AND ZD>=50;KX3:=(CLOSE>=OPEN) AND ZD<50;KX4:=(CLOSE<OPEN) AND ZD<50;IF(A5<REF(A5,1),A5,DRAWNULL),COLOR820000,LINETHICK2;IF(A5>REF(A5,1),A5,DRAWNULL),COLOR00005B,LINETHICK2;IF(A4<REF(A4,1),A4,DRAWNULL),COLOR8C0000,LINETHICK1; IF(A4>REF(A4,1),A4,DRAWNULL),COLOR000055,LINETHICK1; IF(A3<REF(A3,1),A3,DRAWNULL),COLOR9B0000,LINETHICK1; IF(A3>REF(A3,1),A3,DRAWNULL),COLOR00006C,LINETHICK1; IF(A2<REF(A2,1),A2,DRAWNULL),COLORBB0000,LINETHICK1; IF(A2>REF(A2,1),A2,DRAWNULL),COLOR00007D,LINETHICK1; IF(A1<REF(A1,1),A1,DRAWNULL),COLORCC0000,LINETHICK1; IF(A1>REF(A1,1),A1,DRAWNULL),COLOR00009B,LINETHICK1; STICKLINE(KX1,C,O,4,1),COLOR4440FF;STICKLINE(KX1,C,H,0.5,1),COLOR4440FF;STICKLINE(KX1,O,L,0.5,1),COLOR4440FF;STICKLINE(KX2,C,O,4,0),COLOR4440FF;STICKLINE(KX2,O,H,0.5,0),COLOR4440FF;STICKLINE(KX2,C,L,0.5,0),COLOR4440FF;STICKLINE(KX3,C,O,4,1),COLORFFFF33;STICKLINE(KX3,C,H,0.5,1),COLORFFFF33;STICKLINE(KX3,O,L,0.5,1),COLORFFFF33;STICKLINE(KX4,C,O,4,0),COLORFFFF33;STICKLINE(KX4,O,H,0.5,0),COLORFFFF33;STICKLINE(KX4,C,L,0.5,0),COLORFFFF33;【通晓信】牛劲实足(副图)指标公式源码VAR1:=VOL/((HIGHLOW)*2ABS(CLO搜刮引擎优化PEN));ZM:=IF(CLOSE>OPEN,VAR1*(HIGHLOW),IF(CLOSE<OPEN,VAR1*((HIG HOPEN)+(CLOSELOW)),VOL/2)),COLORRED,POINTDOT;ZM1:=IF(CLOSE>OPEN,0VAR1*((HIGHCLOSE)+(OPENLOW)),IF(CLOSE <OPEN,0VAR1*(HIGHLOW),0VOL/2)),COLOR00FF00,POINTDOT; MMB:=(SUM(ZM,30)+SUM(ZM1,30))/10,COLORYELLOW;SG:=MMB>0 AND REF(MMB,1)<MMB;上攻周期:COUNT(SG,5),LINESTICK,COLORWHITE;JSC:=上攻周期<1;DBQD:=FILTER(COUNT(JSC,5)>3 AND NOT(JSC),10);DRAWICON(DBQD,2,1);DRAWBAND(上攻周期,RGB(255,120,120),3,RGB(0,0,0)); DRAWBAND(JSC,RGB(0,0,255),0.5,RGB(0,0,0));STICKLINE(COUNT(上攻周期>3,5)>=3 AND SG,0,上攻周期,1.5,0),COLORRED;XG: COUNT(COUNT(上攻周期>3,5)>=3 AND SG,20)>4;【通晓信】魔鬼K线(副图)指标公式源码VAR1:=REF(OPEN,1);VAR2:=SMA(MAX(OPENVAR1,0),6,1)/SMA(ABS(OPENVAR1),6,1)*100; VAR3:=REF(CLOSE,1);VAR4:=SMA(MAX(CLOSEVAR3,0),6,1)/SMA(ABS(CLOSEVAR3),6,1)*1 00;VAR5:=REF(HIGH,1);VAR6:=SMA(MAX(HIGHVAR5,0),6,1)/SMA(ABS(HIGHVAR5),6,1)*100; VAR7:=REF(LOW,1);VAR8:=SMA(MAX(LOWVAR7,0),6,1)/SMA(ABS(LOWVAR7),6,1)*100; STICKLINE(VAR4<VAR2,VAR2,VAR4,5,0),COLORGREEN , ; STICKLINE(VAR4>VAR2,VAR2,VAR4,5,0),COLORRED , ; STICKLINE(VAR4>VAR2 AND VAR6>VAR8 ANDVAR8>VAR4,VAR4,VAR6,0.5,1),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6>VAR8 ANDVAR8<VAR4,VAR4,VAR6,0.5,1),COLORRED ,;STICKLINE(VAR4>VAR2 AND VAR6<VAR8 ANDVAR6>VAR4,VAR4,VAR8,0.5,1),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6>VAR8 ANDVAR6<VAR2,VAR2,VAR8,0.5,1),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6>VAR8 ANDVAR6>VAR2,VAR2,VAR8,0.5,1),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6<VAR8 ANDVAR8<VAR2,VAR2,VAR6,0.5,1),COLORRED , ;STICKLINE(VAR4>VAR2 AND VAR6<VAR8 ANDVAR8>VAR2,VAR2,VAR6,0.5,1),COLORRED , ;STICKLINE(VAR4<VAR2 AND VAR6>VAR8 ANDVAR6<VAR4,VAR4,VAR8,0.5,1),COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6<VAR8 ANDVAR8<VAR4,VAR4,VAR6,0.5,1),COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6<VAR8 ANDVAR6>VAR4,VAR4,VAR8,0.5,1),COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6>VAR8 ANDVAR6<VAR4,VAR2,VAR8,0.5,1),COLORGREEN ,;STICKLINE(VAR4<VAR2 AND VAR6>VAR8 ANDVAR6>VAR4,VAR2,VAR8,0.5,1),COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6<VAR8 ANDVAR8<VAR2,VAR2,VAR6,0.5,1), COLORGREEN , ;STICKLINE(VAR4<VAR2 AND VAR6<VAR8 ANDVAR8>VAR2,VAR2,VAR6,0.5,1),COLORGREEN , ;【通晓信】牛熊分界(立桩量.中线)指标公式源码AAA:=(3*C+H+L+O)/6;VAR1:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2) +5*REF(AAA,3)+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF( AAA,8))/36;VAR2:=(HHV(VAR1,5)+HHV(VAR1,10)+HHV(VAR1,20))/ 3;VAR3:=(LLV(VAR1,5)+LLV(VAR1,10)+LLV(VAR1,20))/3;VAR4:=( HHV(VAR2,5)+HHV(VAR2,10)+HHV(VAR2,20))/3;VAR5:=(LLV(VAR3, 5)+LLV(VAR3,10)+LLV(VAR3,20))/3;VAR6:=(LLV(VAR1,2)+LLV(VA R1,4)+LLV(VAR1,6))/3;DRAWBAND(VAR1,RGB(155,50,50),VAR6,RG B(250,250,0));短线:VAR1,COLORWHITE;中线:VAR6,COLORYELLOW;金叉:短线>中线 AND REF(短线,1)=REF(中线,1),NODRAW;下跌:IF(VAR1=VAR6,VAR6,DRAWNULL),COLORGREEN;TJ1:=VOL=HHV(VO L,10)AND VOL>2*REF(VOL,1)AND CLOSE>VAR1;立桩量:=FILTER(TJ1,5);TJ2:=IF(BARSLAST(立桩量)=1 AND CLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量)=2 ANDCLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量)=3 ANDCLOSE>REF(HIGH,3),1,0)));冲破:TJ2=1,NODRAW;STICKLINE(CLOSE,REF(HIGH,BARSLAST(立桩量)),REF(HIGH,BARSLAST(立桩量)),1,0),COLORCYAN;STICKLINE(CLOSE,REF(LOW,BARSLAST(立桩量)),REF(LOW,BARSLAST(立桩量)),1,0),COLORYELLOW;STICKLINE(C>=O,C,O,3,0),COLOR000045 ;STICKLINE(C>=O,C,O,2.5,0),COLOR000065;STICKLINE(C>=O,C,O ,2,0),COLOR000085;STICKLINE(C>=O,C,O,1.5,0),COLOR0000A5;S TICKLINE(C>=O,C,O,1,0),COLOR0000C5;STICKLINE(C>=O,C,O,0.5 ,0),COLOR0000E5;STICKLINE(C>=O,H,L,0,0),COLOR0000F5;STICK LINE(C<O,C,O,3,0),COLOR353500;STICKLINE(C<O,C,O,2.5,0),CO LOR454500;STICKLINE(C<O,C,O,2,0),COLOR555500;STICKLINE(C< O,C,O,1.5,0),COLOR656500;STICKLINE(C<O,C,O,1,0),COLOR7575 00;STICKLINE(C<O,C,O,0.5,0),COLOR858500;STICKLINE(C<O,H,L ,0,0),COLOR959500;ZRR:=(YEAR1992)*365+INTPART((YEAR1989)/ 4)+IF(MONTH<=2,DAY+(MONTH1)*31,DAY+INTPART(13*(MONTH+1)/5 )7+(MONTH1)*28+IF(INTPART(YEAR/4)=YEAR/4,1,0)),NODRAW;T:=BARSLAST(ZRRREF(ZRR,1)>WEEKDAYREF(WEEKDAY,1))+1,NODRAW;T1 :=REF(T,T)+T,NODRAW;T2:=REF(T,T1)+T1,NODRAW;T3:=REF(T,T2) +T2,NODRAW;T4:=REF(T,T3)+T3,NODRAW;T5:=REF(T,T4)+T4,NODRA W;T6:=REF(T,T5)+T5,NODRAW;T7:=REF(T,T6)+T6,NODRAW;T8:=REF(T,T7)+T7,NODRA W;周10:(REF(CLOSE,T)+REF(CLOSE,T1)+REF(CLOSE,T2)+REF(CLOSE,T3 )+REF(CLOSE,T4)+REF(CLOSE,T5)+REF(CLOSE,T6)+REF(CLOSE,T7) +REF(CLOSE,T8)+CLOSE)/10,LINETHICK2;【通晓信】牛准反弹(快线.慢线)指标公式源码N:=9;M1:=3;M2:=3;P:=9;快线:=(CLOSELLV(LOW,N))/(HHV(HIGH,N)LLV(LOW,N))*100;慢线:=SMA(快线,M1,1);ELI空:=SMA(慢线,M2,1);ELI牛股:=IF(BARSLAST(CROSS(慢线,ELI空))<P AND CROSS(慢线,ELI空) AND 慢线<20,90,0);LC:=REF(CLOSE,1);RSI:=SMA(MAX(CLOSELC,0),4.1,1)/SMA(ABS(CLOSELC),4.1,1)*10 0;牛准反弹:=CROSS(RSI,11)*80;XG:牛准反弹 OR ELI牛股;【通晓信】启动提醒(平台线.启动线)指标公式源码启动线:SUM(EMA((C+L)/2,2),5)/10.158,COLORRED;均衡线:LLV(SUM( EMA((C+L)/2,2),5)/10.158,4),COLORFF00FF;平台线:LLV(SUM( EMA((C+L)/2,2),5)/10.158,10),COLORFFFFFF;强弱线:EMA(启动线,21),COLORYELLOW;STICKLINE(平台线<启动线,启动线,平台线,0.1,0),COLORFFCCAA; STICKLINE(均衡线<启动线,启动线,均衡线,0.1,0),COLORRED; VAR1:=2*MA(LLV((C+L)/2,8)*1.1,13)EMA((C+L)/2,3)((C+L)/2)* 0.1;VAR2:=IF((EMA((C+L)/2,3)VAR1)*5>0,POW((EMA((C+L)/2,3)VAR1 )*5,2)/10,1*POW((EMA((C+L)/2,3)VAR1)*5,2)/10);VAR3:=IF(VAR2>0,VAR20,0);STICKLINE(VAR3>0 AND REF(VAR3,1)=0 AND(C+L)/2>MA((C+L)/2,8),强弱线,强弱线+0.2,4,0),COLORFFAACC;DRAWTEXT(VAR3>0 AND REF(VAR3,1)=0 AND(C+L)/2>MA((C+L)/2,8),强弱线+0.35,'留意掌握'),LINETHICK3,COLORFFAACC;【通晓信】平台启动(主图)指标公式源码圣:=(HHV(HIGH,21)CLOSE)/(HHV(HIGH,21)LLV(LOW,21))*10010;灵:=(CLOSELLV(LOW,21))/(HHV(HIGH,21)LLV(LOW,21))*100;石:=SMA(灵,13,8);仙:=CEILING(SMA(石,13,8));编著:=SMA(圣,21,8);AABB:=IF(L,CONST(L),DRAWNULL);平台启动:STICKLINE(仙编著>75,AABB,AABB*0.99,15,1),COLOR0000FF;VARZT:=BARSLAST(平台启动);DRAWTEXT(VARZT=1,0.99*(AABB+AABB*0.98)/2,'平台启动'),COLORYELLOW;【通晓信】牛熊线分水岭(中线强弱拐点)指标公式源码JJ:=(CLOSE+HIGH+LOW)/3;A:=EMA(JJ,10);B:=REF(A,1);M1:=EMA(CLOSE,3);M2:EMA(CLOSE,8);分水岭:SMA(M2,2.5,1.5),LINETHICK2,COLORRED;牛线:3*M22*分水岭,LINETHICK2,COLORFF00FF ;熊线:4*分水岭3*M2,LINETHICK2,COLORGREEN;IF (牛线<=熊线,牛线,熊线),COLORGREEN,LINETHICK2;IF (分水岭<=熊线,分水岭,熊线),COLORGREEN,LINETHICK2;IF(牛线>REF(熊线,1),熊线,DRAWNULL),COLORFF2200,LINETHICK2;M3:EMA(M2,13);M4:EMA(M2,55);VAR1:=EMA(M3,55);M5:EMA(M4,81), COLORRED,LINETHICK1;股道:=(1C/SMA(C,13,1))*100;基本:=EMA(C,43);中线强弱拐点:EMA(股道*C/100+基本,3),COLORGRAY,LINETHICK1;。
指标公式
指标公式指标公式1.“神奇均线”使用说明“神奇均线”指标为均线型指标。
本指标反映的是多空博弈游戏中多空动能、势能交替转换的基本状态,是《庄家克星》系列精华核心指标之一。
本指标由“神奇中线”(A1^-A7),“神奇短线”(A8^-A9)和“安全线”(绿色)构成。
从图形的简单变化即可确定多空双方主力谁占优势,大盘或个股是涨还是跌。
本指标操作方便,准确率高。
本指标既适用于中线波段炒作,也适用于短线炒作,是“看长线做短线”的有力工具。
在具体操作中,‘.神奇中线”(Al--A7)适用于中线操作,“神奇短线”(A8-A9)适用于短线操作。
操作要领1、买点:当“神奇中线”由向下发散转变为向上收拢并即将或已经开始向上发散时为极佳的买点。
当“神奇短线”A8与A9发生“金叉”时为短线“买点”。
2、卖点:当“神奇中线”由向上发散转变为向下收拢并即将或已经开始向下发散时为最后的卖点。
当“神奇短线A9与A8发生“死叉”时为短线“卖点”3、注意事项:A、当“神奇中线”、’‘神奇短线”发出买入信号时,如果K线在“安全线”(绿色)之下,可以试建仓,做反弹,但必须快进快出:一旦K线站在“安全线”(绿色)之上,并且有成交量的配合即可加码建仓,此时为较佳的买点。
然后可看长做短,一路持股并等待短线指标或“神奇中线”或“神奇短线”发出卖出信号,然后回避短线调整或清仓离场。
“神奇均线”的特色功能,除能实时提示相对安全的“买点”之外,非常重要的是它从Al~ A7的形态特征上可以清晰的作出判断其基本的“趋势”是上升还是下降。
在具体操作中我们可以““神奇中线”(A1^-A7)不封闭,继续持股不持币”的原则确定是否继续持股待涨。
B、请注意:当‘.神奇中线”形成““压缩平台”后向上发散的股票,是调整已经结束,重新开始启动的股票。
如果“神奇中线”、“神奇短线”发出买进信号的同时,《庄家克星》其它技术分析指标如“多空博弈”、“短线快枪”、‘短线高手”等技术指标也分别发出‘’最佳买点”信号时,十有八九是主升段行情启动前的最佳买点。