通达信指标公式源码一个短线和波段结合的短线强弱指标
通达信指标公式源码资金强弱
1.给你明确的“操作决策”`“中线决策”`“短线止赢价”和“短线买入价”指导;2.给你明确的当日资金情况,机构游资中户及散户今日进出资金情况,明白今日的流入和流出资金,方便你当日作出正确的决策!3.安装方式:安装环境是通达信,不要用通金魔方,先安装操盘线(是被引用的主图公式);再安装当日资金方程;附一下图不懂的看图操作操盘线主图指标源码:M1:=5;M2:=0;M3:=0;叠加指数:=0;BS点信号:=1;短线信号:=5;三线开关:=1;自动C:=INDEXC;自动H:=INDEXH;自动L:=INDEXL;自动O:=INDEXO;大盘低:=CONST(LLV(自动L,叠加指数));大盘高:=CONST(HHV(自动H,叠加指数));大盘差:=大盘高-大盘低;当前低:=CONST(LLV(L,叠加指数));当前高:=CONST(HHV(H,叠加指数));当前差:=当前高-当前低;比:=当前差/大盘差;变C:=当前低+(自动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;变HYC:=当前低HY+(自动HYC-大盘低HY)*比HY,NODRAW;变HYH:=当前低HY+(自动HYH-大盘低HY)*比HY;变HYL:=当前低HY+(自动HYL-大盘低HY)*比HY;变HYO:=当前低HY+(自动HYO-大盘低HY)*比HY;现价:C,NODRAW;MA1:MA(C,M1)COLORWHITE;MA2:MA(C,M2)COLORLIGREEN;MA3:MA(C,M3)COLORLIBLUE;趋势:((MA(C,5)+MA(C,10)+MA(C,15)+MA(C,20))/4),LINETHICK2,COLORGREEN;IF(趋势>REF(趋势,1),趋势,DRAWNULL),LINETHICK2,COLORRED;成本:((COST(90)+COST(70)+COST(50)+COST(30)+COST(10))/5)*三线开关,LINETHICK2,COLORWHITE;生命:EMA(C,55)*三线开关, CIRCLEDOT,COLORYELLOW;牛熊:EMA(C,265)*三线开关,CIRCLEDOT,COLORLIGREEN;JRH:=HHV(C,2);JRL:=LLV(C,2);VAR101:=(CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2));VAR102:=(REF(VAR101,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR103:=(REF(VAR102,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR104:=(REF(VAR103,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR105:=(REF(VAR104,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR106:=(REF(VAR105,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR107:=(REF(VAR106,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VAR108:=(REF(VAR107,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2)); VAR109:=(REF(VAR108,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2)); VARA:=(REF(VAR109,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 VAR013 OR VAR014 OR VAR015 OR VAR016 OR VAR017 OR VAR018,1)) AND VAR101);VAR1A:=((REF(VAR101 OR VAR102 OR VAR103 OR VAR104 OR VAR105 OR VAR106 OR VAR107 OR VAR108 OR VAR109 OR VARA OR VARB OR VARC,1)) AND VARD);红色持股:=VAR101 OR VAR102 OR VAR103 OR VAR104 OR VAR105 OR VAR106 OR VAR107 OR VAR108 OR VAR109 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),COLORMAGENTA,NODRAW;明短买价:进,COLOR33AACC,NODRAW;短买价:=REF(明短买价,1),COLORYELLOW,NODRAW;VAR1MZ:=((CLOSE > REF(CLOSE,1)) AND (CLOSE > REF(CLOSE,2)));VAR2MZ:=((REF(VAR1MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >=REF(CLOSE,2)));VAR3MZ:=((REF(VAR2MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <=REF(CLOSE,2)));VAR4MZ:=((REF(VAR3MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >=REF(CLOSE,2)));VAR5MZ:=((REF(VAR4MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <=REF(CLOSE,2)));VAR6MZ:=((REF(VAR5MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >=REF(CLOSE,2)));VAR7MZ:=((REF(VAR6MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <=REF(CLOSE,2)));VAR8MZ:=((REF(VAR7MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >=REF(CLOSE,2)));VAR9MZ:=((REF(VAR8MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <=REF(CLOSE,2)));VARAMZ:=((REF(VAR9MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >=REF(CLOSE,2)));VARBMZ:=((REF(VARAMZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <=REF(CLOSE,2)));VARCMZ:=((REF(VARBMZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >=REF(CLOSE,2)));VARDMZ:=((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,2)));VAREMZ:=((REF(VARDMZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <=REF(CLOSE,2)));VARFMZ:=((REF(VAREMZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >=REF(CLOSE,2)));VAR10MZ:=((REF(VARFMZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <=REF(CLOSE,2)));VAR11MZ:=((REF(VAR10MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >=REF(CLOSE,2)));VAR12MZ:=((REF(VAR11MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <=REF(CLOSE,2)));VAR13MZ:=((REF(VAR12MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >=REF(CLOSE,2)));VAR14MZ:=((REF(VAR13MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <=REF(CLOSE,2)));VAR15MZ:=((REF(VAR14MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >=REF(CLOSE,2)));VAR16MZ:=((REF(VAR15MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <=REF(CLOSE,2)));VAR17MZ:=((REF(VAR16MZ,1) AND (CLOSE <= REF(CLOSE,1))) AND (CLOSE >=REF(CLOSE,2)));VAR18MZ:=((REF(VAR17MZ,1) AND (CLOSE >= REF(CLOSE,1))) AND (CLOSE <=REF(CLOSE,2)));VAR19MZ:=(REF((((((((((((VARDMZ OR VAREMZ) OR VARFMZ) OR VAR10MZ) ORVAR11MZ) OR VAR12MZ) OR VAR13MZ) OR VAR14MZ) OR VAR15MZ) OR VAR16MZ) OR VAR17MZ) OR VAR18MZ),1) AND VAR1MZ AND CURRBARSCOUNT<短线信号);VAR1AMZ:=(REF((((((((((((VAR1MZ OR VAR2MZ) OR VAR3MZ) OR VAR4MZ) OR VAR5MZ) OR VAR6MZ) OR VAR7MZ) OR VAR8MZ) OR VAR9MZ) OR VARAMZ) OR VARBMZ) OR VARCMZ),1) AND VARDMZ AND CURRBARSCOUNT<短线信号);AAK:=(REF(CLOSE,1)+REF(CLOSE,2)+OPEN)/3;MA7:=MA(CLOSE,1)*BS点信号;转强:=(6*H+5*REF(H,1)+4*REF(H,2)+3*REF(H,3)+2*REF(H,4)+1*REF(H,5))/(6+5+4+3+ 2+1);转弱:=(6*L+5*REF(L,1)+4*REF(L,2)+3*REF(L,3)+2*REF(L,4)+1*REF(L,5))/(6+5+4+3+2 +1);BB2:=IF(C>REF(转强,1),1,IF(C<REF(转弱,1),-1,0));DD2:=BARSLAST(NOT(BB2=0));B:=IF(BB2=0,REF(BB2,DD2),BB2);中短:=IF(B=-1,MA(HIGH,6),MA(LOW,6))*BS点信号;持股:BARSLASTCOUNT(MA7>中短),COLORRED,NODRAW;持币:BARSLASTCOUNT(MA7<中短),COLORGREEN,NODRAW;短买:IF(VAR19MZ,1,0),COLORYELLOW,NODRAW;生命线多头:=生命>REF(生命,1);生命上:BARSLASTCOUNT(生命线多头>0),COLORYELLOW,NODRAW;牛熊线多头:=牛熊>REF(牛熊,1);牛熊上:BARSLASTCOUNT(牛熊线多头>0),COLORLIGREEN,NODRAW;成本线多头:=成本>REF(成本,1);成本上:BARSLASTCOUNT(成本线多头>0),COLORWHITE,NODRAW;SA:=MAX(MAX(趋势,成本),MAX(生命,牛熊));SB:=MIN(MIN(趋势,成本),MIN(生命,牛熊));粘合:100*(SA-SB)/SB,COLORWHITE,NODRAW;三日涨幅:=(C-REF(C,3))/REF(C,3)*100;十日涨幅:=(C-REF(C,10))/REF(C,10)*100;牛牛:BARSLASTCOUNT(生命上>0 AND 牛熊上>0 AND 成本上>0 AND 粘合<10 AND 持股>0 AND 三日涨幅<15 AND 十日涨幅<30),COLORRED,NODRAW;DRAWTEXT(ISLASTBAR,成本,'←平均成本'),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(AAK)>0,0.02,0,0,STRCAT('主力护盘价=',CON2STR(AAK,2)))COLOR00FFFF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(短买价)>0,0.02,0.1,0,STRCAT('短线买入价=',CON2STR(短买价,2)))COLORLIRED;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(离场价)>0,0.02,0.1,0,STRCAT('短线止赢价= ',CON2STR(离场价,2)))COLORGREEN;STICKLINE(CURRBARSCOUNT<=叠加指数,变H,变L,0,0),COLOR888888;STICKLINE(CURRBARSCOUNT<=叠加指数,变O,变C,2,0),COLOR888888;STICKLINE(CURRBARSCOUNT<=叠加指数AND 变C>=变O,变O,变C,2,1),COLORAAAAAA;STICKLINE(CURRBARSCOUNT<=叠加指数,变HYH,变HYL,0,0),COLORYELLOW; STICKLINE(CURRBARSCOUNT<=叠加指数,变HYO,变HYC,2,0),COLORYELLOW; STICKLINE(CURRBARSCOUNT<=叠加指数AND 变HYC>=变HYO,变HYO,变HYC,2,1),COLORYELLOW;STICKLINE(MA7<中短,LOW,HIGH,0,1),COLORCYAN;STICKLINE(MA7>中短,LOW,HIGH,0,1),COLORRED;STICKLINE(((OPEN>CLOSE)AND(MA7<中短)),(CLOSE-0.003),OPEN,3.1,0),COLORLIBLUE; STICKLINE(((OPEN<CLOSE)AND(MA7<中短)),CLOSE,OPEN,3.1,1),COLORCYAN; STICKLINE(((OPEN>CLOSE)AND(MA7>中短)),OPEN,(CLOSE-0.003),3.1,0),COLORRED; STICKLINE(((OPEN<CLOSE)AND(MA7>中短)),OPEN,CLOSE,3.1,1),COLORRED; DRAWICON(CROSS(MA7,中短),L,7);DRAWICON(CROSS(中短,MA7),H,8);DRAWICON(VAR19MZ,L,1);DRAWICON(VAR1AMZ,H,2);当日资金方程式副图指标源码:超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;净流入:=(超B+大B+中B+小B)-(超S+大S+中S+小S)NODRAW;超大单:=(超B)-(超S);大单:=(大B)-(大S);中单:=(中B)-(中S);小单:=(小B)-(小S);DAZHI:=CONST(MAX(ABS(净流入),MAX(ABS(超大单),MAX(ABS(大单),MAX(ABS(中单),ABS(小单)))))),NODRAW;流入:=ABS(超B+大B+中B+小B)*1000/VOL;流出:=ABS(超S+大S+中S+小S)*1000/VOL;净流买比:=流入*100/(流入+流出);大宗进:=(超B)+(大B),NODRAW;大宗出:=(超S)+(大S),NODRAW;非大宗进:=(中B)+(小B),NODRAW;非大宗出:=(中S)+(小S),NODRAW;大宗进限制:=IF((超B+大B)=0,0,大宗进),NODRAW;大宗出限制:=IF((超S+大S)=0,0,大宗出),NODRAW;非大宗进限制:=IF(中B+小B=0,0,非大宗进),NODRAW;非大宗出限制:=IF(中S+小S=0,0,非大宗出),NODRAW;资金流向买:=大宗进限制+非大宗进限制;资金流向卖:=大宗出限制+非大宗出限制;{ 当日}DRAWRECTREL(0,0,990,999,IF(120,RGB(10,0,0),0));DRAWRECTREL(0,330,990,390,RGB(10,0,0));DRAWRECTREL(10,325,983,8,RGB(188,188,188));DRAWRECTREL(50,555,950,530,RGB(0,140,0));DRAWRECTREL(50,555,50+CONST(净流买比*900/100),530,RGB(140,0,0)); DRAWTEXT_FIX(1,0.05,0.4,0,STRCAT(STRCAT('净流买比',CON2STR(净流买比,2)),'%')),COLORYELLOW;DRAWRECTREL(500,555,500,530,RGB(250,250,0));DRAWRECTREL(60,CONST(800-IF((超大单)>0,(ABS(超大单)*250/DAZHI),0)),200,800,RGB(128,0,0));DRAWRECTREL(60,800,200,CONST(800+IF((超大单)<0,(ABS(超大单)*250/DAZHI),0)),RGB(0,128,0));DRAWRECTREL(300,CONST(800-IF((大单)>0,(ABS(大单)*250/DAZHI),0)),430,800,RGB(128,0,0));DRAWRECTREL(300,800,430,CONST(800+IF((大单)<0,(ABS(大单)*250/DAZHI),0)),RGB(0,128,0));DRAWRECTREL(600,CONST(800-IF((中单)>0,(ABS(中单)*250/DAZHI),0)),730,800,RGB(128,0,0));DRAWRECTREL(600,800,730,CONST(800+IF((中单)<0,(ABS(中单)*250/DAZHI),0)),RGB(0,128,0));DRAWRECTREL(820,CONST(800-IF((小单)>0,(ABS(小单)*250/DAZHI),0)),950,800,RGB(128,0,0));DRAWRECTREL(820,800,950,CONST(800+IF((小单)<0,(ABS(小单)*250/DAZHI),0)),RGB(0,128,0));DRAWRECTREL(60,799.8,950,800.2,RGB(255,0,0));DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(超大单)>0,0.08,0.900,0,'机构'),COLORLIRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(超大单)<0,0.08,0.900,0,'机构'),COLOR00FF00;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(超大单)=0,0.08,0.900,0,'机构'),COLOR80FFFF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单)>0,0.32,0.900,0,'游资'),COLORLIRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单)<0,0.32,0.900,0,'游资'),COLOR00FF00; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单)=0,0.32,0.900,0,'游资'),COLOR80FFFF; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中单)>0,0.62,0.900,0,'中户'),COLORLIRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中单)<0,0.62,0.900,0,'中户'),COLOR00FF00; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中单)=0,0.62,0.900,0,'中户'),COLOR80FFFF; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小单)>0,0.85,0.900,0,'散户'),COLORLIRED; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小单)<0,0.85,0.900,0,'散户'),COLOR00FF00; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小单)=0,0.85,0.900,0,'散户'),COLOR80FFFF; DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(超大单)>0,0.03,0.6,0,STRCAT(STRCAT(' ',CON2STR(超大单,1)),'万')),COLORLIRED;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(超大单)<0,0.03,0.6,0,STRCAT(STRCAT(' ',CON2STR(超大单,1)),'万')),COLOR00FF00;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(超大单)=0,0.03,0.6,0,STRCAT(STRCAT(' ',CON2STR(超大单,1)),' ')),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单)>0,0.25,0.6,0,STRCAT(STRCAT('',CON2STR(大单,1)),'万')),COLORLIRED;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单)<0,0.25,0.6,0,STRCAT(STRCAT('',CON2STR(大单,1)),'万')),COLOR00FF00;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(大单)=0,0.25,0.6,0,STRCAT(STRCAT('',CON2STR(大单,1)),' ')),COLORYELLOW;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中单)>0,0.55,0.6,0,STRCAT(STRCAT('',CON2STR(中单,1)),'万')),COLORLIRED;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中单)<0,0.55,0.6,0,STRCAT(STRCAT('',CON2STR(中单,1)),'万')),COLOR00FF00;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小单)>0,0.80,0.6,0,STRCAT(STRCAT('',CON2STR(小单,1)),'万')),COLORLIRED;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(小单)<0,0.80,0.6,0,STRCAT(STRCAT('',CON2STR(小单,1)),'万')),COLOR00FF00;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(净流入)>0,0.93,0.4,1,STRCAT('当日净买:',STRCAT(CON2STR(净流入,1),'万'))) COLOR0000FF;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(净流入)<0,0.93,0.4,1,STRCAT('当日净买:',STRCAT(CON2STR(净流入,1),'万'))) COLOR00FF00;DRAWTEXT_FIX(1,0.05,0.47,0,STRCAT(STRCAT('买入额:',CON2STR(资金流向买,1)),'万')),COLOR0000FF;DRAWTEXT_FIX(1,0.50,0.47,0,STRCAT(STRCAT('卖出额:',CON2STR(资金流向卖,1)),'万')),COLOR00FF00;DRAWTEXT_FIX(1,0.00,0.34,0,'当日资金方程'),COLORWHITE;短买价:="操盘线.明短买价#DAY";离场价:="操盘线.明离场价#DAY";中线决策:="操盘线.持股#DAY";多方力度:=(3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SM A((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1));空方力度:=100*(HHV(HIGH,55)-CLOSE)/(HHV(HIGH,55)-LLV(LOW,55));操作决策:=多方力度>空方力度;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(操作决策)>0,0.15,0.05,0,STRCAT('【操作决策】===','☆波段操作☆'))COLORRED;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(操作决策)=0,0.15,0.05,0,STRCAT('【操作决策】===','★轻仓短线★'))COLORBLUE;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中线决策)>0,0.15,0.15,0,STRCAT('【中线决策】===','☆持股待涨☆'))COLORRED;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(中线决策)=0,0.15,0.15,0,STRCAT('【中线决策】===','★持币观望★'))COLORBLUE;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(短买价)>0,0.15,0.25,0,STRCAT('【短线买入价】===★',STRCAT(CON2STR(短买价,2),'元★')))COLORBLUE;DRAWTEXT_FIX(CURRBARSCOUNT=1 AND(离场价)>0,0.15,0.25,0,STRCAT('【短线止赢价】===☆',STRCAT(CON2STR(离场价,2),'元☆')))COLORRED;。
简单明了通达信指标公式源码
简单明了通达信指标公式源码
以下是通达信指标公式的源码(部分):
1.移动平均线(MA)
```
MA(CLOSE,N):收盘价的N日简单移动平均线
MA(C,N):C为输入数据,例如指标的参数可以是成交量、MACD柱等;
```
2.指数平滑移动平均线(EMA)
```
EMA(C,N):收盘价的N日指数平滑移动平均线
```
3.相对强弱指标(RSI)
```
RSI(C,N):C为收盘价序列,N为计算周期;
```
4. 随机相对强弱指标(StochRSI)
```
StochRSI(C, N, M1, M2): C为收盘价序列,N为计算RSI的周期,
M1为计算K值的周期,M2为计算D值的周期;
```
5.BOLL指标(布林线)
```
BOLL(CLOSE,N,P):C为收盘价序列,N为计算布林线的周期,P为布林线上下轨的标准差倍数;
```
6.指数平均数指标(EMA)
```
EMA(CLOSE,N):收盘价序列的N日指数平均数;
```
7.指数平滑异同平均线(MACD)
```
MACD(CLOSE,SHORT,LONG,M):C为收盘价序列,SHORT为快速移动平均线的时间周期,LONG为慢速移动平均线的时间周期,M为移动平均线的移动天数;
```
8.能量潮(OBV)
```
OBV(CLOSE,V):C为收盘价序列,V为成交量序列;
```
以上是通达信指标公式的部分源码,还有其他指标的源码未列出。
非常实用的波段神器通达信指标公式源码
非常实用的波段神器通达信指标公式源码以下是通达信指标公式的一些源码,这些指标常被视为实用的波段神器。
1.均线指标公式:MA(CLOSE,N):=AVERAGE(CLOSE,N);MA(CLOSE,N1,N2):=MA(MA(CLOSE,N1),N2);2.相对强弱指标公式(RSI):LC:=REF(CLOSE,1);RSI(CLOSE,N):=SMA(MAX(CLOSE-LC,0),N,1)/SMA(ABS(CLOSE-LC),N,1)*100;3. 动量指标公式(Momentum):MOM(CLOSE,N):=CLOSE-REF(CLOSE,N);4. 平均幅度指标公式(Average True Range, ATR):TR:=MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1)),ABS(LOW-REF(CLOSE,1))),ABS(HIGH-REF(LOW,1)));ATR(N):=MA(TR,N);5. 布林带指标公式(Bollinger Bands):MB:=MA(CLOSE,N);UP:=MB+STD(CLOSE,N)*K;DN:=MB-STD(CLOSE,N)*K;6. 弗拉基米尔指标公式(Vladimir):TYP:=(HIGH+LOW+CLOSE)/3;VOLMA(CLOSE,V):=MA(VOL,V);FRAV(TYP):=MA(TYP*(HIGH-LOW),VI);FAPT:=(FRAV(TYP)/VOLMA(CLOSE,V))/FRAV(TYP)*FRAV(VOLMA(CLOSE, VI)-VOLMA(CLOSE,V));7. 成交量指标公式(Volume):VOLMA(CLOSE,N):=MA(VOL,N);以上是一些通达信指标公式的简单示例。
请注意,这些只是指标的公式描述,实际使用中可能需要根据自己的需求进行修改和优化。
三代波段通达信指标公式源码
三代波段通达信指标公式源码三代波段指标是一种常用于短期波段交易的技术指标,具有较好的精度和准确性。
它由三个子指标组成,分别是趋势指标、动能指标和波动指标。
下面是三代波段指标的公式源码详解。
一、趋势指标公式源码:T1:=(CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100;T2:= abs(CLOSE-REF(CLOSE,1));TREND:IF(CROSS(AMA(AMA(AMA(AMA(AMA(CLOSE,6),12),24),48),96), LOW),1,_IF(CROSS(LOW,AMA(AMA(AMA(AMA(AMA(CLOSE,6),12),24),48),96)),-1,0));根据趋势指标源码,首先计算了收盘价和前一天收盘价的变动幅度,并将结果乘以100得到T1、然后,计算了收盘价和前一天收盘价的绝对差值,得到T2、最后,通过对AMA指标的计算,判断当前趋势的多空状态,如果收盘价突破最近96天的最低价,则为多头趋势(1),如果最低价突破最近96天的AMA指标值,则为空头趋势(-1),否则为无趋势(0)。
二、动能指标公式源码:T3:=(EMA(((CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N)))*100,M));动能指标源码中,首先计算了最近N个交易日内收盘价与最低价范围的变动幅度比例,并乘以100得到T3、然后,对T3进行了M日的指数移动平均计算,并得到了动能指标的最终结果。
三、波动指标公式源码:T4:=ATR(20);波动指标源码中,通过计算ATR指标的20日平均值得到T4综上所述,三代波段指标的公式源码包含了趋势指标、动能指标和波动指标三个方面的计算。
每个指标都有一定的计算逻辑,并可以根据需要进行参数设置和调整。
通过综合应用这些指标,可以帮助波段交易者更好地把握市场趋势和交易机会,提高交易准确性和盈利能力。
通达信波段指标公式
通达信波段指标公式一、KDJ指标:1.K值=(2*移动平均线(n日内最高价+最低价之和)/3-最低价)/(最高价-最低价)×1002.D值=移动平均线(K值)3.J值=3*K值-2*D值二、MACD指标:1、DIF=短期EMA(12)-长期EMA(26)2、DEA=移动平均线(DIF)3、BAR=(DIF-DEA)*2三、RSI指标:1、RSI=100*(n日内上涨点数的总和/n日内上涨及下跌点数之和)2、RSI=100*(n日内上涨点数的总和/n日内上涨点数的总和+n日内下跌点数的总和)四、CCI指标:1、中心线=(n日内最高价+n日内最低价+收盘价之和)/32、偏差平均值=(n日内(最高价-中心线)+n日内(最低价-中心线)+n日内(收盘价-中心线))/n3、CCI=(收盘价-中心线)/偏差平均值/0.015五、OBV指标:1、OBV=前一日的OBV+(当日的收盘价-前一日的收盘价)*成交量2、OBV=前一日的OBV-(前一日的收盘价-当日的收盘价)*成交量六、多空对比指标:1、多空对比指标=(近n日内多头持仓量/近n日内多头持仓量+空头持仓量)×1002、多空对比指标=(今天多头持仓量/今天多头持仓量+昨天空头持仓量)×100七、能量潮指标:1、能量潮=(今日收盘价-过去20日最低价之差)/(过去20日最高价-过去20日最低价之差)×1002、能量潮=(今日最高价-过去20日最低价之差)/(过去20日最高价-过去20日最低价之差)×100八、随机指标:1、K值=50*(当日最高价-当日开盘价)/(当日最高价-当日最低价)+50*(当日最低价-当日开盘价)/(当日最高价-当日最低价)2、D值=移动平均线(K值)3、J值=3*K值-2*D值。
[转载]通达信真正的短线之王指标公式
[转载]通达信真正的短线之王指标公式原⽂地址:通达信真正的短线之王指标公式作者:股票公式RV:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;RG:=(CLOSE-LLV(LOW,5))/(HHV(HIGH,5)-LLV(LOW,5))*100;J0:=(HIGH+LOW)/2;QJ:=EMA(J0,3);J1:=IF(CLOSE>QJ,VOL,0);J2:=IF(CLOSE<QJ,VOL,0);量能:IF(CAPITAL<1,MA(VOL,74),MA(SUM(J1-J2,22),3)),COLOR00DDDD,NODRAW;趋势:IF(CAPITAL<1,EMA(量能,360),EMA(量能,21)),COLOR008800,NODRAW;VAR3:=(量能-趋势);VAR44:=SMA(RV,3,1);VAR55:=SMA(VAR44,3,1);STICKLINE(VAR3>0,20,10,5,1),COLOR0000FF;STICKLINE(VAR3<0,100,90,10,1),COLOR00FF00;DRAWICON(CROSS(VAR44,VAR55) AND VAR55<30,2,1);DRAWICON(CROSS(VAR55,VAR44) AND VAR55>30,97,2);DRAWBAND(VAR55,RGB(0,22,224),VAR44,RGB(255,50,50));KK:EMA(SMA(RG,3,1),2),COLORFFFFFF;DD:SMA(KK,3,1),COLOR00FFFF;DRAWTEXT(CROSS(VAR44,VAR55) AND CROSS(KK,DD),10,'共振'),COLOR00FFFF;共振点:=(CROSS(VAR44,VAR55) AND CROSS(KK,DD));STICKLINE(共振点>0,0,100,2,0),COLOR008888;STICKLINE(共振点>0,0,100,1.5,0),COLOR00AAAA;STICKLINE(共振点>0,0,100,0.8,0),COLOR00DDDD;STICKLINE(共振点>0,0,100,0.3,0),COLOR00FFFF;VAR1:=1;VAR2:=((((2*CLOSE)+HIGH)+LOW) / 4);低⾦叉进:20,COLORFF00FF,LINETHICK2;⾼死叉出:90,COLORBLUE,LINETHICK2;VAR4:=LLV(LOW,5);VAR5:=HHV(HIGH,4);C1:=(EMA((((VAR2-VAR4)/(VAR5-VAR4))*100),4)*VAR1),COLORFF00FF,LINETHICK2;C2:=(EMA(((0.667*REF(C1,1))+(0.333*C1)),2)*VAR1),COLORFFFFFF,LINETHICK2;条件:=CROSS(C1,C2) AND C1<40;条件0:=CROSS(C2,C1) AND C1>90;TJ1:=CROSS(C1,C2);TJ2:=CROSS(C2,C1);TJ3:=CROSS(C1,C2) AND REF(C1,1)<20;TJ4:=CROSS(C2,C1) AND REF(C1,1)>80;DRAWTEXT(FILTER((REF(条件,1) AND (REF(LOW,1)>LOW OR TJ2))OR (REF(条件,2) AND (REF(LOW,2)>LLV(LOW,3) OR TJ2))OR (REF(条件,3) AND (REF(LOW,3)>LLV(LOW,4) OR TJ2)),4),70,'⽌'),COLORRED; {DRAWTEXT(FILTER((REF(条件,1) AND (REF(LOW,1)>LOW OR TJ2))OR (REF(条件,2) AND (REF(LOW,2)>LLV(LOW,3) OR TJ2))OR (REF(条件,3) AND (REF(LOW,3)>LLV(LOW,4) OR TJ2)),4),60,'跌'),COLORRED;} DRAWTEXT(FILTER((REF(条件,1) AND (REF(LOW,1)>LOW OR TJ2)) OR(REF(条件,2) AND (REF(LOW,2)>LLV(LOW,3) OR TJ2))OR (REF(条件,3) AND (REF(LOW,3)>LLV(LOW,4) OR TJ2)),4),65,'买'),COLORRED;DRAWTEXT(条件,20,'买'),COLORRED;STICKLINE(条件,0,20,2,0),COLORRED;DRAWTEXT(条件0,85,'卖'),COLORBLUE;DRAWTEXT(CROSS(C1,75),70,'险区'),COLORGREEN;DRAWTEXT(TJ3,65,'安'),COLORRED;DRAWTEXT(TJ3,60,'买'),COLORRED;DRAWTEXT(TJ4,85,'逃顶'),COLORBLUE;STICKLINE(TJ4,100,80,2,0),COLORGREEN;VAR200:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;VAR300:=SMA(SMA(VAR200,3,1),3,1)/28.57;VAR400:=EMA(VAR300,5);操盘:=3*VAR300-2*VAR400;A1:=CROSS(操盘,VAR300) AND VAR300<2.1 AND C>O; STICKLINE(A1,30,0,4,0),COLOR770077;STICKLINE(A1,30,0,3,0),COLOR990099;STICKLINE(A1,30,0,2,0),COLORBB00BB;STICKLINE(A1,30,0,1,0),COLORDD00DD;STICKLINE(A1,30,0,0.3,0),COLORFF00FF;DRAWTEXT(A1,36,'财神到'),COLORRED;★遵守纪律★:100,COLORRED,NODRAW;★交易之魂★:100,COLORRED,NODRAW;本周热门通达信公式通达信⽜⾦筹码指标公式 (2011-12-16)通达信涨停五基因指标公式 (2011-12-15)通达信北狼资⾦分析指标公式 (2011-12-16)通达信顶底操盘指标公式 (2011-12-15)通达信波动突破主图指标公式 (2011-12-16)通达信明朗涨势指标公式 (2011-12-16)通达信⼗年⼀剑主图指标公式 (2011-12-16)通达信主⼒进场轨迹指标公式 (2011-12-15)通达信⼀⽬了然KDJ指标公式 (2011-12-15)通达信综合趋势线指标公式 (2011-12-15)本⽉热门通达信公式通达信顶底参考指标公式 (2011-12-01)通达信主⼒骗线指标公式 (2011-11-23)通达信私募进场洗盘指标公式 (2011-11-22)通达信天天抓涨停选股指标公式 (2011-11-27)通达信主⼒挖坑选股指标公式 (2011-12-01)通达信⼀根线搞定DMI指标公式 (2011-12-08)通达信只管卖股指标公式 (2011-11-27)通达信仿⼤智慧⾄尊版MACD指标公式 (2011-11-23)通达信⾦⼿指指标公式 (2011-11-22)通达信不破不⽴主图指标公式 (2011-12-01)年度热门通达信公式通达信买必赚指标公式 (2011-03-17)通达信2011年最⽜特⾊主图指标公式 (2011-06-15)通达信赢在龙头多空资⾦线指标公式 (2011-05-02)通达信2011年最⽜特⾊副图指标公式 (2011-06-15)通达信波浪启动抓⿊马指标公式 (2011-04-03)通达信MACD很准指标公式 (2011-03-23)通达信打击主⼒机构指标公式 (2011-03-26)通达信⼗战七胜主图+选股指标公式 (2011-03-25)通达信主⼒买卖盘+外内盘差指标公式 (2011-03-21)通达信涨跌都赚指标公式 (2011-04-04)总榜热门通达信公式⾮常准的趋势买卖(通达信) (2010-05-24)⼀个绝顶⾼⼿前辈的指标和⼤家⼀起分享(通达信) (2010-05-24)通达信操盘密码机构专⽤ (2010-06-02)通达信唐能通精准买卖 (2010-06-02)通达信介⼊时机公式 (2010-05-25)通达信抓住⿊马指标公式 (2010-05-24)通达信超级组合顶底公式 (2010-05-25)通达信主⼒控盘分析指标公式 (2010-05-24)通达信买必赚指标公式 (2011-03-17)通达信2011年最⽜特⾊主图指标公式 (2011-06-15)。
通达信板块强弱指标:板块强弱(通达信源码...
通达信板块强弱指标:板块强弱(通达信源码...通达信板块强弱指标:板块强弱(通达信源码)N:=45;VAR2:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;VAR3:=SMA(VAR2,5,1);VAR4:=SMA(VAR3,3,1);个股波:SMA(VAR4,3,1),COLORWHITE,LINETHICK3;VAR22:=(INDEXC-LLV(INDEXL,N))/(HHV(INDEXH,N)-LLV(INDEXL,N))*100;VAR33:=SMA(VAR22,5,1);VAR44:=SMA(VAR33,3,1);指数波:SMA(VAR44,3,1),COLORRED,LINETHICK5;AA:=( '399300$ CLOSE '-LLV('399300$ LOW ',N))/(HHV('399300$ HIGH ',N)-LLV('399300$ LOW ',N))*100;AA1:=SMA(AA,5,1);AA2:=SMA(AA1,3,1);沪深300:SMA(AA2,3,1),COLORMAGENTA,LINETHICK2;BB:=( '399005$ CLOSE '-LLV('399005$ LOW ',N))/(HHV('399005$ HIGH ',N)-LLV('399005$ LOW ',N))*100;BB1:=SMA(BB,5,1);BB2:=SMA(BB1,3,1);中小板指:SMA(BB2,3,1),COLORYELLOW,LINETHICK1;CC:=( '399006$ CLOSE '-LLV('399006$ LOW ',N))/(HHV('399006$ HIGH ',N)-LLV('399006$ LOW ',N))*100;CC1:=SMA(CC,5,1);CC2:=SMA(CC1,3,1);创业板指:SMA(CC2,3,1),COLORCYAN,LINETHICK1;DD:=( '399305$ CLOSE '-LLV('399305$ LOW ',N))/(HHV('399305$ HIGH ',N)-LLV('399305$ LOW ',N))*100;DD1:=SMA(DD,5,1);DD2:=SMA(DD1,3,1);基金:SMA(DD2,3,1),COLORLICYAN,LINETHICK1;EE:=( '399190$ CLOSE '-LLV('399190$ LOW ',N))/(HHV('399190$ HIGH ',N)-LLV('399190$ LOW ',N))*100;EE1:=SMA(EE,5,1);EE2:=SMA(EE1,3,1);金融行业:SMA(EE2,3,1),COLORGREEN,LINETHICK2;FF:=( '399200$ CLOSE '-LLV('399200$ LOW ',N))/(HHV('399200$ HIGH ',N)-LLV('399200$ LOW ',N))*100;FF1:=SMA(FF,5,1);FF2:=SMA(FF1,3,1);地产:SMA(FF2,3,1),COLORLIGREEN,LINETHICK1;GG:=( '399110$ CLOSE '-LLV('399110$ LOW ',N))/(HHV('399110$ HIGH ',N)-LLV('399110$ LOW ',N))*100;GG1:=SMA(GG,5,1);GG2:=SMA(GG1,3,1);农林牧渔:SMA(GG2,3,1),COLORLIGRAY,LINETHICK1;HH:=( '399941$ CLOSE '-LLV('399941$ LOW ',N))/(HHV('399941$ HIGH ',N)-LLV('399941$ LOW ',N))*100;HH1:=SMA(HH,5,1);HH2:=SMA(HH1,3,1);新能源:SMA(HH2,3,1),COLORBROWN,LINETHICK1;#股票#。
通达信指标公式源码 波段操作指标(粉色区域持股,出现绿柱抛出)
RSVA1:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;RSVA2:=100*(HHV(HIGH,9)-CLOSE)/(HHV(HIGH,9)-LLV(LOW,9));VAR21:=SMA(RSVA2,9,1)+100;VAR11:=SMA(RSVA1,3,1);VAR51:=SMA(VAR11,3,1)+100;顶底线:=VAR51-VAR21+50;VAR2:=LLV(LOW,33);VAR3:=HHV(HIGH,21);VAR4:=EMA((CLOSE-VAR2)/(VAR3-VAR2)*100,10)*-1+100;趋势:=100-EMA(0.191*REF(VAR4,1)+0.809*VAR4,1);STICKLINE(C,100,90,4,0),COLORFFCC33;STICKLINE(C,90,80,4,0),COLORFF9933;STICKLINE(顶底线>REF(顶底线,1),20,80,4,0),COLOR9999FF;STICKLINE(顶底线<REF(顶底线,1),20,80,4,0),COLOR009966;STICKLINE((趋势>REF(趋势,1) AND 顶底线<REF(顶底线,1)),20,80,4,0),COLOR9999FF; STICKLINE((趋势<REF(趋势,1) AND 顶底线>REF(顶底线,1)),20,80,4,0),COLOR009966; STICKLINE(C,20,10,4,0),COLORFF6633;STICKLINE(C,10,0,4,0),COLORFF3333;底线:10,COLORWHITE;顶线:90,COLORWHITE;趋势线:100-EMA(0.191*REF(VAR4,1)+0.809*VAR4,1),LINETHICK2,COLORBLUE;当前安全度:100-EMA(0.191*REF(VAR4,1)+0.809*VAR4,1),CIRCLEDOT,LINETHICK2,COLORRED; DRAWTEXT(CURRBARSCOUNT=6,5,'高安全区'),COLORWHITE;DRAWTEXT(CURRBARSCOUNT=6,15,'安全区'),COLORWHITE;DRAWTEXT(CURRBARSCOUNT=6,45,'绿区持币'),COLORFFC000;DRAWTEXT(CURRBARSCOUNT=6,50,'(投资区)'),COLORWHITE;DRAWTEXT(CURRBARSCOUNT=6,55,'粉区持股'),COLORFFC000;DRAWTEXT(CURRBARSCOUNT=6,85,'风险区'),COLORWHITE;DRAWTEXT(CURRBARSCOUNT=6,95,'高风险区'),COLORWHITE;{强拉升}Y1:=LLV(L,17);Y2:=SMA(ABS(L-REF(L,1)),17,1);Y3:=SMA(MAX(L-REF(L,1),0),17,2);Q:=-(EMA(IF(L<=Y1,Y2/Y3,-3),1));STICKLINE(CROSS(Q,0),15,0,4,0), , COLORYELLOW;强拉升: IF(CROSS(Q,0),1,0),COLORYELLOW;Q1:= (CLOSE-MA(CLOSE,40))/MA(CLOSE,40)*100, , COLOR00FF00,LINETHICK2; STICKLINE(CROSS(Q1,-24),20,0,4,0), , COLORMAGENTA;加强拉升: IF(CROSS(Q1,-24),1,0),COLORMAGENTA;VAR22:=EXPMA(EXPMA(EXPMA((2*CLOSE+HIGH+LOW)/4,4),4),4);天:=( MA((VAR22-REF(VAR22,1))/REF(VAR22,1)*100,2));地:=( MA((VAR22-REF(VAR22,1))/REF(VAR22,1)*100,1));STICKLINE(地>天AND 地<0,10,0,1,0),COLORRED;开始拉升:STICKLINE(地>天AND 地<0,10,0,1,0)=1,COLORRED;{<<波段绝品>>}VAR1B:=(HHV(HIGH,9)-CLOSE)/(HHV(HIGH,9)-LLV(LOW,9))*100-70;VAR2B:=SMA(VAR1B,9,1)+100;VAR3B:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;VAR4B:=SMA(VAR3B,3,1);VAR5B:=SMA(VAR4B,3,1)+100;VAR6B:=VAR5B-VAR2B;趋势1: IF(VAR6B>45,VAR6B-45,0),COLOR00FFFF,LINETHICK2;VAR2Q:=REF(LOW,1);VAR3Q:=SMA(ABS(LOW-VAR2Q),3,1)/SMA(MAX(LOW-VAR2Q,0),3,1)*100;VAR4Q:=EMA(IF(CLOSE*1.3,VAR3Q*10,VAR3Q/10),3);VAR5Q:=LLV(LOW,30);VAR6Q:=HHV(VAR4Q,30);VAR7Q:=IF(MA(CLOSE,58),1,0);VAR8Q:=EMA(IF(LOW<=VAR5Q,(VAR4Q+VAR6Q*2)/2,0),3)/999*VAR7Q;火焰山:=IF(VAR8Q>100,100,VAR8Q);STICKLINE(火焰山>0 AND 火焰山>REF(火焰山,1),0 ,火焰山*1.2,3.5,0 ),COLOR4444FF; STICKLINE(火焰山>0 AND 火焰山>REF(火焰山,1),0 ,火焰山*1.2,2.5,0 ),COLOR5555FF; STICKLINE(火焰山>0 AND 火焰山>REF(火焰山,1),0 ,火焰山*1.2,1.5,0 ),COLOR7777FF; STICKLINE(火焰山>0 AND 火焰山>REF(火焰山,1),0 ,火焰山*1.2,0.5,0 ),COLOR9999FF; STICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),3.5,0),COLOR000033; STICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),2.8,0),COLOR000055; STICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),2.0,0),COLOR000077; STICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),1.2,0),COLOR000099; STICKLINE(REF(趋势1,1)< 趋势1, 趋势1,REF(趋势1,1),0.4,0),COLOR0000DD; STICKLINE(REF(趋势1,1)> 趋势1, 趋势1,REF(趋势1,1),3.5,0),COLOR003300; STICKLINE(REF(趋势1,1)> 趋势1, 趋势1,REF(趋势1,1),2.8,0),COLOR005500; STICKLINE(REF(趋势1,1)> 趋势1, 趋势1,REF(趋势1,1),2.0,0),COLOR007700; STICKLINE(REF(趋势1,1)> 趋势1, 趋势1,REF(趋势1,1),1.2,0),COLOR009900; STICKLINE(REF(趋势1,1)> 趋势1, 趋势1,REF(趋势1,1),0.4,0),COLOR00DD00;逃顶:=CROSS(82,RSI);STICKLINE( 逃顶,逃顶,10,3.5,0),COLORFF5500;STICKLINE( 逃顶,逃顶,15,2.5,0),COLORFF8800;STICKLINE( 逃顶,逃顶,20,1.5,0),COLORFFAA00;STICKLINE( 逃顶,逃顶,25,0.5,0),COLORFFCC00;STICKLINE( 逃顶,逃顶,30,0.1,0),COLORFFFF00;D1:=(C+L+H)/3;D2:=EMA(D1,6);D3:=EMA(D2,5);BBUY:=CROSS(D2,D3);强弱线:50,COLORGREEN,POINTDOT;DRAWICON(BBUY,20,1);VARR1:=SMA(MAX(CLOSE-REF(C,1),0),6,1)/SMA(ABS(CLOSE-REF(C,1)),6,1)*100; DRAWICON(CROSS(82,VARR1),10,15);DRAWTEXT(CROSS(82,VARR1),35,'逃'),COLORYELLOW;。
精准短线通达信指标公式源码
LC:=REF(CLOSE,1);RSI5:=((SMA(MAX((CLOSE - LC),0),5,1) / SMA(ABS((CLOSE - LC)),5,1)) * 100);TR1:=SUM(MAX(MAX((HIGH - LOW),ABS((HIGH - REF(CLOSE,1)))),ABS((LOW - REF(CLOSE,1)))),10);HD:=(HIGH - REF(HIGH,1));LD:=(REF(LOW,1) - LOW);DMP:=SUM(IF(((HD > 0) AND (HD > LD)),HD,0),10);DMM:=SUM(IF(((LD > 0) AND (LD > HD)),LD,0),10);PDI:=((DMP * 100) / TR1);MDI:=((DMM * 100) / TR1);ADX:=MA(((ABS((MDI - PDI)) / (MDI + PDI)) * 100),5);AV:=(RSI5 + ADX);DXR:=(((ADX + REF(ADX,5)) / 2) + RSI5);WR10:=((100 * (HHV(HIGH,10) - CLOSE)) / (HHV(HIGH,10) - LLV(LOW,10))); NEWVOL:=(RSI5 - WR10);介入:=(AV + NEWVOL);介入选股:IF(CROSS(介入,0),1,0),STICK,COLORRED;VAR1:=SMA(介入选股,3,1);VAR2:SMA(VAR1,3,1),COLOR0000FF;VAR3:SMA(VAR2,3,1),COLOR00FFFF;收获:IF(CROSS(VAR2,VAR3) AND (VAR2<40),5,0* 10000),COLOR0000FF,LINETHICK2; STICKLINE(收获,0,2.5,8,0),COLORRED;STICKLINE(收获,0.45,4.0,2,0),COLORRED;RSV:=(((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 50);K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;X:=LLV(J,2)=LLV(J,8);秋天梦想: IF(CROSS(J,3),1,0),STICK,COLORFFFF00;STICKLINE(秋天梦想,0,1,3,0),COLOR009999;STICKLINE(秋天梦想,0,1,2,0),COLOR00DDDD;STICKLINE(秋天梦想,0,1,1,0),COLOR00FFFF;解放股民: IF(介入<5,-0.2,0),STICK,COLOR00FF00,LINETHICK1;解放股民日:STICKLINE(解放股民,0,-0.2,3,0),COLOR00FF00,LINETHICK6; A:=COUNT(CROSS(MA(C,60),MA(C,5)),7)=1;{7日内5日线跌破60日均线} B:=MA(C,5)<REF(MA(C,5),3) AND MA(C,5)>REF(MA(C,5),1);{5日均线拐头} A AND B AND V>REF(V,1)*1.3;。
通达信板块强弱副图指标通达信指标公式源码
通达信板块强弱副图指标通达信指标公式源码通达信板块强弱副图指标上证:SUM((("999999$C")/REF(("999999$C"),1)-1)*100,0),LINETHICK2; 深证:SUM((("399001$C")/REF(("399001$C"),1)-1)*100,0);中⼩板:SUM((("399005$C")/REF(("399005$C"),1)-1)*100,0);创业板:SUM((("399006$C")/REF(("399006$C"),1)-1)*100,0);农林:SUM((("399231$C")/REF(("399231$C"),1)-1)*100,0);采掘:SUM((("399232$C")/REF(("399232$C"),1)-1)*100,0);制造:SUM((("399233$C")/REF(("399233$C"),1)-1)*100,0);⽔电:SUM((("399234$C")/REF(("399234$C"),1)-1)*100,0);建筑:SUM((("399235$C")/REF(("399235$C"),1)-1)*100,0);批零:SUM((("399236$C")/REF(("399236$C"),1)-1)*100,0);运输:SUM((("399237$C")/REF(("399237$C"),1)-1)*100,0);餐饮:SUM((("399238$C")/REF(("399238$C"),1)-1)*100,0);IT:SUM((("399239$C")/REF(("399239$C"),1)-1)*100,0);⾦融:SUM((("399240$C")/REF(("399240$C"),1)-1)*100,0);地产:SUM((("399241$C")/REF(("399241$C"),1)-1)*100,0);商务:SUM((("399242$C")/REF(("399242$C"),1)-1)*100,0);科研:SUM((("399243$C")/REF(("399243$C"),1)-1)*100,0);公共:SUM((("399244$C")/REF(("399244$C"),1)-1)*100,0);⽂化:SUM((("399248$C")/REF(("399248$C"),1)-1)*100,0);央企:SUM((("399334$C")/REF(("399334$C"),1)-1)*100,0);民营:SUM((("399336$C")/REF(("399336$C"),1)-1)*100,0);军⼯:SUM((("399368$C")/REF(("399368$C"),1)-1)*100,0);当前个指线:SUM((C/REF(C,1)-1)*100,0),LINETHICK2;。
通达信准确的波段指标公式
通达信准确的波段指标公式Z:=5;N:=10;HIGH1:=IF(HIGH<REF(H,1),(H+L)*0.5,HIGH);LOW2:=IF(LOW>=(REF(L,1)+REF(L,2))/2,CLOSE,LOW);LOW1:=IF(LOW>=REF(LOW,1),CLOSE,LOW);CLOSE1:=IF(CLOSE>=REF(CLOSE,1),CLOSE,(HIGH1+LOW2)* 0.5);VARA:=IF(CLOSE=CLOSE,(CLOSE+LOW+OPEN+HIGH+HIGH 1+LOW2)/6,AMOUNT/(100*VOL));VARU1:=LLV(LOW1,30);VARA1:=HHV(HIGH1,30);VARU2:=LLV(LOW1,21);VARA2:=HHV(HIGH1,21);CC:=MA((VARA-VARU2)/(VARA2-VARU2)*100,11);CC1:=EMA(CC,7),COLOR336699;B:=EMA((VARA-VARU1)/(VARA1-VARU1)*105,13);B1:=EMA(B,8);移动平均A:STICKLINE(B-B1>0 ,B*1.03,B1,3,1),COLOR3366AA;移动平均B:STICKLINE(B-B1<=0,B*1.03,B1,3,1),COLOR779966;VAR44:=ZIG(3,Z);RSV:=(VAR44-LLV(VAR44,N))/(HHV(VAR44,N)-LLV(VAR44,N))*100;月MD:="KDJ.D#MONTH",COLORFF0000,LINETHICK2;月MK:="KDJ.K#MONTH",COLOREECC00;周CD:="KDJ.D#WEEK",COLOR0000BB,LINETHICK2;周CK:="KDJ.K#WEEK",COLOR0099FF;月死KD:=MA((月MD,月MK),1);周死KD:=MA((周CD,周CK),1);周死RSI:="RSI.RSI2#WEEK"<="RSI.RSI3#WEEK";月金KD:=MA((月MK,月MD),1);周金KD:=MA((周CK,周CD),1);周金RSI:="RSI.RSI2#WEEK">="RSI.RSI3#WEEK"*0.998;周金R:="RSI.RSI1#WEEK">="RSI.RSI2#WEEK";AA:=STICKLINE(月死KD && 周死KD && 周死RSI,100,50,0,1),COLOR998888;BB:=STICKLINE(月金KD && 周金KD && 周金RSI,0,50,0,1),COLOR8800DD;K:SMA(RSV,3,1),COLORAA9999,LINETHICK2;D:SMA(K,3,1),COLOR00AA00,LINETHICK2;J:=3*K-2*D,COLORFFAABB,LINETHICK1;STICKLINE(周CK<周CD,D,K*1.01,4.2,1),COLORFFCC00;STICKLINE(周CK>=周CD,D,K*1.01,4.2,1),COLOR0000FF;RMA2:=MA(MA("RSI.RSI2#MONTH",2),2),COLORGRAY,LINET HICK1;RMA3:=MA(MA("RSI.RSI3#MONTH",2),2),COLOR000099,LIN ETHICK1;STICKLINE(RMA2>=RMA3,D*0.999,K*1.03,0.8,0),COLOR006 8FF;STICKLINE(RMA2<RMA3,D*0.999,K*1.03,0.8,0),COLORFF004 4;A:=(3*CLOSE+LOW+OPEN+HIGH)/6;D1:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF( A,4)+15*REF(A,5)+14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*R EF(A,11)+8*REF(A,12)+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*RE F(A,17)+2*REF(A,18)+REF(A,20))/211;D2:=EMA(D1,2);D3:=EMA(D2,2);K1:=EMA(D3,2);卖转向:STICKLINE(PEAKBARS(3,15,1)=1,101,51,1.6,0),COLOR00FF44,LI NETHICK2;买转向:STICKLINE(TROUGHBARS(3,15,1)=0 AND HIGH>LOW+0.01,0,49,1.6,0),COLORAA00FF;死叉RSI:=DRAWICON(CROSS(周CD,周CK) AND 周死RSI,99,2);转向:=DRAWICON((CROSS(周CK,周CD) AND 周金RSI),25,5);月金叉:=月MK>月MD;月周金叉:=IF(CROSS(周CK,周CD) AND 月金叉,31,0),LINETHICK1,COLOR3333FF;周金叉RSI:=STICKLINE(CROSS("RSI.RSI2#WEEK","RSI.RSI3#WEEK"),0,25, 3,0),COLOR0038FF;金叉RSI:=DRAWICON(CROSS("RSI.RSI2#WEEK","RSI.RSI3#WEEK"),18, 9);波段升:STICKLINE(CROSS(D1,K1) AND CC>=CC1,1,33,0.1,0),COLOR00FFFF;波段下:STICKLINE(CROSS(K1,D1) AND CC<CC1,98,68,0.1,0),COLORAAAAAA;DIFFR:=EMA(CLOSE,12)-EMA(VARA,26);DEAR:=EMA(DIFFR,9),COLORFFFFFF,LINETHICK1;MACDA:=EMA(CLOSE,12)-EMA(CLOSE,26);MACDD:=EMA(CLOSE,9)-EMA(CLOSE,12);MACDB:=EMA(CLOSE,9)-EMA(CLOSE1,12);MACDH:=EMA(CLOSE,12)-EMA(CLOSE1,26);MACDC:=EMA(CLOSE,8)-EMA(CLOSE1,15);MACDM:=EMA(CLOSE,7)-EMA(CLOSE,11);中线持仓:=IF(CLOSE>=SAR(4,2,20),SAR(4,2,20),DRAWNULL);中线空仓:=IF(CLOSE<SAR(4,2,20),SAR(4,2,20),DRAWNULL);DXB:=COUNT(CROSS(MACDM,0) OR CROSS(MACDD,0) OR CROSS(MACDA,0),15)>=2;DXC:=COUNT(CROSS(MACDM,0) OR CROSS(MACDD,0) OR CROSS(MACDA,0) OR CROSS(MACDH,0),20)>=2;DXD:=COUNT(CROSS(MACDM,0) OR CROSS(MACDC,0) OR CROSS(MACDH,0) OR CROSS(MACDB,0),20)>=2;DXE:=COUNT(CROSS(MACDM,0) OR CROSS(MACDH,0) OR CROSS(MACDB,0) OR CROSS(MACDD,0) ORCROSS(MACDA,0),30)>=4;MD:=BACKSET(DEAR>=REF(DEAR,1),2);STICKLINE((MACDD>0 OR MACDH>0) AND 中线持仓 ,0,7,3,1),COLOR0000FF;STICKLINE((MACDC>=0 OR MACDH>=0) AND 中线持仓AND (DXB OR DXC OR DXD OR DXE) AND MD,1,12,2.2,0),COLORCC88FF;STICKLINE((MACDD<=0 OR MACDC<=0) AND 中线空仓,100,94,3.8,1),COLORAA7777;MCST:=DMA(AMOUNT/(100*VOL),VOL/CAPITAL);DIF:=EMA(EMA(CLOSE,18)-EMA(CLOSE,34),11);MACD:=EMA(EMA(DIF,11),11),COLOR58FF58;DEF:=2*(DIF-MACD),COLORFFFF00,LINETHICK0;STICKLINE(C>=MCST,12,19,1,1),COLOR00EEFF;。
通达信指标公式源码分时高低点指标
日时转换:=IF(PERIOD=5,120,240);QZS:=(EMA(CLOSE,10)+EMA(CLOSE,32))/2;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); DRAWBAND(VAR1,RGB(250,30,30),EMA(VAR1,60),RGB(30,210,30));牵引线:=VAR1,COLORYELLOW;强弱线:EMA(VAR1,日时转换),POINTDOT,COLORWHITE;趋势关注:IF(CROSS(VAR1,EMA(VAR1,60)) ANDVAR6,1,0),NODRAW,COLORRED;量价关注:IF(CROSS(VAR3,VAR5) AND VAR6,1,0),NODRAW,COLORWHITE; 冲击量:=IF(VAR3>VAR5 AND VAR6,1,0),NODRAW,COLORYELLOW;强势区:=IF(VAR1>强弱线,1,DRAWNULL),NODRAW,COLORRED;止损区:=IF(VAR1<强弱线,1,DRAWNULL),NODRAW,COLORGREEN; STICKLINE(QZS>VAR1,QZS,VAR1,1,0),COLORFF00FF;STICKLINE(冲击量=1,QZS,VAR1,1,0),COLORYELLOW;MA30:=EMA(CLOSE,30);强弱:=EMA(CLOSE,900);{STICKLINE((MA30>强弱),MA30,强弱,1,0),COLORRED;STICKLINE((MA30<强弱),MA30,强弱,1,0),COLORBLUE;}H1:=MAX(DYNAINFO(3),DYNAINFO(5));L1:=MIN(DYNAINFO(3),DYNAINFO(6));P1:=H1-L1;阻力:L1+P1*7/8,COLOR00DD00;支撑:L1+P1*0.5/8,COLOR00DD00;现价:CLOSE,COLORWHITE,LINETHICK4;{DRAWICON(趋势关注=1,支撑,13);DRAWTEXT(量价关注=1,支撑,'*量价关注'),COLORWHITE;}{分时突破}分时顶:=HHV(H,480),COLORRED,LINETHICK2;W1:=C=HHV(C,20);W2:=BARSLAST(W1);W3:=IF(W2>0,REF(C,W2),REF(C,W2));W4:=CROSS(C,REF(W3,1));均线5:=MA(C,5)LINETHICK1,COLORCYAN;均价线:=SUM(C*V,240)/SUM(V,240),COLORYELLOW;分时压力:=MA(REF(HHV(C,30),1),2),COLORMAGENTA;分时支撑:=MA(REF(LLV(C,30),1),2),COLORBLUE;{DRAWICON(W4 AND COUNT(W4,5)=1,分时压力,9); }STICKLINE(FILTER(CROSS(C,REF(分时顶,1)),10) AND C>REF(分时顶,1),支撑,C,4,0),COLORMAGENTA;{短突破}MAA:=MA(C,3);MAB:=MA(C,8);生命线:=SUM(VOL*(O+C)/2,88)/SUM(VOL,88),COLORFF80FF,LINETHICK1; 持股线:HHV(MA(C,18),2),COLORWHITE,LINETHICK1;分离线:IF(MA(C,18)<持股线,(MA(C,18)-(持股线-MA(C,18))),持股线),COLORGREEN,LINETHICK1;MA18:MA(C,18),LINETHICK1,COLORYELLOW;{STICKLINE((持股线>分离线),分离线,持股线*1.001,8, 0)COLORLIGREEN;} DRAWBAND(分离线,RGB(255,255,0),持股线,RGB(0,255,255));持股线1:HHV(MA(C,18),2),COLORYELLOW,LINETHICK1;。
波段指标——做波段的利器通达信指标公式源码
波段指标——做波段的利器通达信指标公式源码波段指标是一种用于短期交易的技术指标,它可以帮助投资者找到股票的买入和卖出时机。
通达信是一个广泛使用的股票分析软件,它提供了丰富的指标计算工具。
下面是波段指标通达信源码的详细说明,共计超过1200字。
以下是通达信中波段指标的计算公式源码的一个示例:```c//定义波段指标的公式参数input n1 = 20;input n2 = 10;input n3 = 6;//计算波段指标的公式var f1 = CLOSE > REF(HHV(HIGH, n1), 1);var f2 = CLOSE < REF(LLV(LOW, n1), 1);var f3 = COUNT(f1, n2) > 0 AND COUNT(f2, n2) > 0;var f4 = SUM(f3, n3) == n3;//输出波段指标的结果PlotWaveBand = f4;```在这个示例中,n1、n2和n3是用户可以自定义的参数,它们分别表示波段指标中的周期长度。
用户可以根据自己的需求设置这些参数的数值。
该公式计算了一个布尔变量f1,它表示当前价格是否大于前n1个周期内的最高价;同时计算了一个布尔变量f2,它表示当前价格是否小于前n1个周期内的最低价。
然后,它根据f1和f2计算了f3,表示在前n2个周期内,有至少一个周期的最高价高于前n1个周期内的最高价,同时有至少一个周期的最低价低于前n1个周期内的最低价。
最后,它计算了一个布尔变量f4,它表示在前n3个周期中,f3为真的周期的数量是否等于n3、如果f4为真,则将PlotWaveBand设置为1;否则将PlotWaveBand设置为0。
通过以上的源码,用户可以自定义波段指标的计算公式,并将其添加到通达信的分析工具中进行使用。
使用波段指标可以帮助投资者快速找到股票的买入和卖出时机,从而提高交易的效果。
通达信指标公式源码 短线无敌指标(源码)
JRH:=HHV(C,2);JRL:=LLV(C,2);MA3:=MA(CLOSE,3);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) ANDCLOSE>=REF(CLOSE,2));VAR10:=(REF(VARF,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));VAR11:=(REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));VAR12:=(REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));VAR13:=(REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));VAR14:=(REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));VAR15:=(REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));VAR16:=(REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2));VAR17:=(REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2));VAR18:=(REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=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);红色持股:VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 OR VAR8 OR VAR9 OR VARA OR VARB OR VARC,COLOR0000FF,NODRAW;离场:=IF(红色持股,JRL,DRAWNULL);明离场价:=离场,COLORFF99FF,NODRAW;今离场价:REF(离场,1)COLOR0000FF,NODRAW;青色观望:VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 OR VAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,COLORFFFF00,NODRAW; 进:=IF(青色观望,JRH,DRAWNULL);明进场价:=进,COLOR33AACC,NODRAW;今进场价:REF(明进场价,1),COLORFF0000,NODRAW;短买:VAR19,COLOR33AACC,NODRAW;品红离场:VAR1A,COLORFF99FF,NODRAW;急速超跌:(CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100<-14,COLORFFFFFF,NODRAW; 上市日期年:REF(YEAR,BARSCOUNT(CLOSE)-1),NODRAW,COLOR0000FF;月:REF(MONTH,BARSCOUNT(CLOSE)-1),NODRAW,COLORFF00FF;日:REF(DAY,BARSCOUNT(CLOSE)-1),NODRAW,COLOR00FFFF;辰星线:(20*YTSL+19*REF(YTSL,1)+18*REF(YTSL,2)+17*REF(YTSL,3)+16*REF(Y TSL,4)+15*REF(YTSL,5)+14*REF(YTSL,6)+13*REF(YTSL,7)+12*REF(YTSL,8)+11*REF(YTSL,9)+10*REF(YTSL,10)+9*REF(YTSL,11)+8*REF(YTSL,12)+7*R EF(YTSL,13)+6*REF(YTSL,14)+5*REF(YTSL,15)+4*REF(YTSL,16)+3*REF(YT SL,17)+2*REF(YTSL,18)+REF(YTSL,20))/211,COLOR0000FF;牵牛线:MA(CLOSE,26),COLORFF00FF;等待:=IF(MA3>辰星线,辰星线,MA3);IF(等待>REF(等待,1),等待,DRAWNULL),LINETHICK2,COLOR00FFFF;IF(辰星线>REF(辰星线,1),辰星线,DRAWNULL),LINETHICK2,COLOR0000FF; IF(辰星线<REF(辰星线,1),辰星线,DRAWNULL),COLOR00FF00;IF(牵牛线>REF(牵牛线,1),牵牛线,DRAWNULL),LINETHICK1,COLORFF00FF; IF(牵牛线<REF(牵牛线,1),牵牛线,DRAWNULL),COLOR669933; STICKLINE(ISLASTBAR AND (红色持股OR REF(红色持股,1)=1),今离场价,今离场价,30,1),COLOR0000FF;STICKLINE(ISLASTBAR AND (青色观望OR REF(青色观望,1)=1),今进场价,今进场价,30,1),COLOR00FF00;STICKLINE(C>=O,L,H,0,0),COLOR0000CC;STICKLINE(C<O,L,H,0,0),COLOR999900;STICKLINE(1,C,O,3.5,0),COLOR858500;STICKLINE(C>=O,C,O,3.5,0),COLOR0000E5;STICKLINE(红色持股,CLOSE,O,2.8,0),COLOR000055;STICKLINE(红色持股,CLOSE,O,2,0),COLOR000088;STICKLINE(红色持股,CLOSE,O,1.5,0),COLOR0000AA;STICKLINE(红色持股,CLOSE,O,1,0),COLOR0000CC;STICKLINE(红色持股,CLOSE,O,0.5,0),COLOR0000EE;STICKLINE(青色观望,CLOSE,O,2.8,0),COLOR555500;STICKLINE(青色观望,CLOSE,O,2,0),COLOR888800;STICKLINE(青色观望,CLOSE,O,1.5,0),COLORAAAA00;STICKLINE(青色观望,CLOSE,O,1,0),COLORCCCC00;STICKLINE(青色观望,CLOSE,O,0.5,0),COLOREEEE00;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.8,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;DRAWTEXT(短买,REF(CLOSE,1),'←短买'),COLOR33FFCC;STICKLINE(品红离场,O,O+CO/3,2.8,0),COLOR550055;STICKLINE(品红离场,O,O+CO/3,2,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; DRAWTEXT(品红离场,REF(CLOSE,1)+0.1,'←离场'),COLORFF99FF;。
通达信指标公式源码 短线买卖指标组合
1.投机指标投机5:100*(C-LLV(L,5))/(HHV(C,5)-LLV(L,5)),COLORred;投机10:100*(C-LLV(L,10))/(HHV(C,10)-LLV(L,10)),COLORwhite;投机20:100*(C-LLV(L,20))/(HHV(C,20)-LLV(L,20)),COLORFF8000;投机30:100*(C-LLV(L,30))/(HHV(C,30)-LLV(L,30)),COLOR00FFFF;抄底: IF(TROUGHBARS(2,5,1)=0 ANDHIGH>LOW+0.01,20,0),COLORFF66FF ,LINETHICK2 ;卖出: IF(投机20>=100,30,0),LINETHICK2,COLORGREEN;2.收藏很久(N 1 100 5)趋势线:3*SMA((CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,5,1)-2*SMA(S MA((CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100,N,1),3,1);见底: 10;准备: IF(趋势线<=20,40,0);买入: IF(CROSS(趋势线,见底),60,0),colorred;卖出: IF(趋势线>=80,100,0);3.绝对稳赚(N 1 100 5)Var1:=REF(CLOSE,2);A2: SMA(MAX(CLOSE-Var1,0),N,1)/SMA(ABS(CLOSE-Var1),N,1)*100, COLORyellow;买1: IF(A2<16,30,0); DRAWTEXT(A2<10,60,'买'),COLORF0F000;Var2:=REF(CLOSE,1);Var3:=SMA(MAX(CLOSE-Var2,0),5,1)/SMA(ABS(CLOSE-Var2),5,1)*100;抄底: IF(Var3<10,30,0);DRAWTEXT(Var3<10,40,'底'),COLORF0F000;逢高派发区: STICKLINE(A2>=80,A2+1,A2-1,1.5,0), COLORRED,LINEthICK3; VAR1J:=close/(ema(ema((c+l+h)/3,3),26)*0.9)<0.95 ;放箭:IF(VAR1J,15,0),STICK,linethick3,COLORRED;DRAWTEXT(VAR1J ,10,'箭'),COLORF0F000;Vare1:=(INDEXC-REF(INDEXC, 1))/REF(INDEXC, 1);Vare2:=(CLOSE-REF(CLOSE, 1))/REF(CLOSE, 1);Vare3:=IF(Vare1>0.010, 0.900, 1) AND IF(Vare1>(-0.025), 1, 1.200);Vare4:=Vare3*(Vare2-Vare1)*100;Vare5:=SUM(Vare4, 10);Vare6:=SMA(Vare5, 40, 1);Vare7:=IF(CLOSE and MA(VOL, 5)/240 AND CLOSE>REF(CLOSE, 1)*1.0 AND CLOSE,88,0);{Var38>Var39;}Vare8:=IF(CLOSE/REF(CLOSE, 1)>1.050 AND VOL/CAPITAL*100<10 AND CLOSE<17 AND HIGH/CLOSE<1.010 AND Vare7>0, 91, 0);追击:IF(Vare8>90,40,0),STICK,linethick3,COLORyellow;DRAWTEXT(Vare8>90,30,'追击'),COLORyellow;4.抄底逃顶王(P1 1 100 10 P2 1 100 3)80, POINTDOT,LINETHICK2;20, POINTDOT,LINETHICK2;VAR1:=LLV(LOW,P1);VAR2:=HHV(HIGH,P1);K: EMA((CLOSE-VAR1)/(VAR2-VAR1)*100,P2),COLORRED,LINETHICK2 , ; D: EMA(0.667*REF(K,1)+0.333*K,3),LINETHICK1 ,;VARC:=SMA(ABS(L-REF(L,1)),3,1)/SMA(MAX(L-REF(L,1),0),3,1); VARD:=EMA(IF(C< EMA(C,250),VARC*1000,VARC*10),3);火焰山:EMA(IF(L<=LLV(L,30),VARD/2+HHV(VARD,30),0),3)/618; STICKLINE(火焰山>100,0,火焰山*1.2,8,0);STICKLINE(火焰山>100,0,火焰山,4,1);抄底: IF(TROUGHBARS(2,5,1)=0 ANDHIGH>LOW+0.01,20,0),COLORYELLOW ,LINETHICK2 ;VAR3:=PEAKBARS(3,15,1)<10;VAR5:=IF(VAR3=1,2,0);顶:= IF(VAR5=2,2,0);顶A:IF(顶>REF(顶,1),45,0),COLORGREEN,LINETHICK2;DRAWTEXT(顶A=50,45,'逃顶'),COLOR00FF00;DRAWTEXT(抄底=20,30,'抄底'),COLORRED;抓牛股:LS:=C/REF(C,1)>1.048 AND C=H ANDBETWEEN(FORCAST(V,4),0.2*FORCAST(V,12),2.1*FORCAST(V,12));抓牛:FILTER(LS,28);波段阻击AA05:MA(C,5),LINETHICK3,COLOR00CCFF;五日乖离率:=(C-AA05)/AA05*100;BB05:=ATAN((AA05/REF(AA05,1)-1)*100)*180/3.1416;速度5:=SMA(EMA((AA05-REF(AA05,1))/REF(AA05,1),3)*100,3,1);加速度5:EMA((速度5-REF(速度5,1)),3),NODRAW;IF(BB05>30 AND AA05>REF(AA05,1),AA05,DRAWNULL),LINETHICK3,COLORRED;AA10:MA(C,10);AA20:=MA(C,20);BB10:=ATAN((AA10/REF(AA10,1)-1)*100)*180/3.1416;IF(BB05<0 AND AA05<REF(AA05,1),AA05,DRAWNULL),LINETHICK3,COLORGREEN;AA30:MA(C,30);三拾日乖离率:(C-AA30)/AA30*100,NODRAW;VAR1:=(AA20-AA30)>REF((AA20-AA30),1) AND AA20>REF(AA20,1) AND AA30>REF(AA30,1);VAR2:=(AA30-AA20)<REF((AA30-AA20),1) AND AA20<REF(AA20,1) AND AA30<REF(AA30,1);BB30:=ATAN((AA30/REF(AA30,1)-1)*100)*180/3.1416;IF(BB30>15 AND AA30>REF(AA30,1),AA30,DRAWNULL),LINETHICK3,COLORFF00FF;波段狙击:=FILTER(BB30>30 AND BB10>45 AND CROSS(BB05,60),10);加仓:=FILTER(COUNT(CROSS(BB05,30),5)>=1 AND AA05>REF(AA05,1) AND 三拾日乖离率>REF(三拾日乖离率,1) AND AA10>REF(AA10,1)AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1) ,10) ;清仓:=FILTER(COUNT(CROSS(30,BB05),5)>=1 AND (C>AA30 OR O>AA30) AND AA05<REF(AA05,1) AND 三拾日乖离率<REF(三拾日乖离率,1) ANDAA10<REF(AA10,1),10);DRAWTEXT(加仓,LOW*0.98,'←加仓'),COLORRED;JC:=CROSS(0,五日乖离率) AND 三拾日乖离率<REF(三拾日乖离率,1) AND AA10>REF(AA10,1) ;减仓:=FILTER(JC,10);MR:=COUNT(CROSS(五日乖离率,0),3)>=1 AND 三拾日乖离率>REF(三拾日乖离率,1) AND AA05>REF(AA05,1) AND (C/REF(C,1)-1)*100>5 ANDREF(C,1)<AA30;买入:=FILTER(MR,10);DRAWTEXT(减仓,HIGH*1.02,'←减仓'),COLORCYAN;DRAWTEXT(买入,LOW*0.98,'←买入'),COLORYELLOW;DRAWTEXT(清仓,HIGH*1.02,'←清仓'),COLORGREEN;DRAWTEXT(波段狙击,LOW*0.98,'←波段狙击'),COLORYELLOW;VAR21:=MAX(ABS(HIGH-AMOUNT/VOL/100),ABS(AMOUNT/VOL/100-LOW)); VAR3:=ABS((OPEN+CLOSE)/2-AMOUNT/VOL/100);MV:=(VAR21+VAR3)/AMOUNT*VOL*100*50;短线上涨极限:(H-MA(C,5))/MA(C,5)>0.1;短期下跌极限:(MA(C,5)-L)/L>0.1;智能KDJ: 特点抄底很灵验,底部三根线,顶部二根线,-10、0、10、90、105,抢钱轴-10,见顶105N : 2 90 9M1: 2 30 3M2: 2 30 3{KDJ}RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;K:SMA(RSV,M1,1);D:SMA(K,M2,1);J:3*K-2*D;顶轴:105, POINTDOT;上轴:90, POINTDOT;下轴:10, POINTDOT;底轴:0, POINTDOT;抢钱轴:-10, POINTDOT;DRAWTEXT(CROSS(J,顶轴) ,100,'大出'), COLORYELLOW;DRAWTEXT(CROSS(J,上轴) ,90,'小出'), COLOR99FFCC;DRAWTEXT(CROSS(下轴,J) ,10,'小进'), COLORBLUE;DRAWTEXT(CROSS(底轴,J) ,0,'大进'), COLORRED;DRAWTEXT(CROSS(抢钱轴,J) ,-5,'狂进'), COLORWHITE;{黄金方块}RA:=LLV(LOW,35);RB:=HHV(HIGH,30);RC:=EMA((CLOSE-RA)/(RB-RA)*4,4)*19;近日均价:=MA(CLOSE,5),COLORYELLOW,LINETHICK2;STICKLINE(RC<6 AND100*(HHV(HIGH,19)-CLOSE)/(HHV(HIGH,19)-LLV(LOW,19))>97 ,0 ,近日均价*1.15 ,2 , 0),COLORYELLOW;{提示}VAR1:=(EMA(CLOSE,12)-EMA(CLOSE,26))*100+50;VAR2:=EMA(VAR1,9);VAR3:=(HHV(HIGH,21)-CLOSE)/(HHV(HIGH,21)-LLV(LOW,21))*100-10; VAR4:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*100;VAR5:=SMA(VAR4,13,8);Q1:=(CLOSE-REF(CLOSE, 1))/REF(CLOSE, 1)*100;Q2:=(CLOSE-LLV(LOW, 18))/(HHV(HIGH, 18)-LLV(LOW, 18))*100;Q3:=SMA(Q2, 9, 1);Q4:=SMA(Q3, 3, 1);趋势:=3*Q3-2*Q4;Q5:=趋势>1*REF(趋势, 1);Q6:=LLVBARS(LOW, 50);Q7:=SUM(VOL, Q6);Q8:=HHVBARS(HIGH, 50);Q9:=SUM(VOL, Q8);Q10:=(CLOSE-REF(OPEN, Q8))/REF(OPEN, Q8)*100;Q11:=HHV(趋势,5);A1:=EMA(Q3, 3);A2:=EMA(A1, 3);A3:=EMA(A2, 3);A4:=EMA(A3, 3);A5:=EMA(A4, 3);A6:=EMA(A5, 3);A:=EMA(A4, 3);DRAWTEXT(CROSS(趋势, 20) AND Q10<-13,10,'看量入场'), COLORRED; DRAWTEXT(CROSS(趋势, A5) AND REF(趋势,1)<34,REF(趋势,1),'盯紧'), COLORWHITE;DRAWTEXT(CROSS(趋势, A1) AND Q5 AND A1<20 AND Q1>9 ORA1>1*REF(A1, 1)AND Q1>4 AND A1<60, 45, '调'), COLOR00FF00;黄金分割提示; 可提示分割点,安装在任意主图高:=REF(HHV(H,60),3);低:=REF(LLV(L,60),3);H19:=高-(高-低)*0.191;H38:=高-(高-低)*0.382;H50:=高-(高-低)*0.500;H61:=高-(高-低)*0.618;H80:=高-(高-低)*0.809;TOP:REFDATE(高,DATE),POINTDOT,COLORWHITE,NODRAW;%80.9:REFDATE(H19,DATE),POINTDOT,COLORYELLOW,NODRAW;%61.8:REFDATE(H38,DATE),POINTDOT,COLORMAGENTA,NODRAW;{%50.0:REFDATE(H50,DATE),POINTDOT,COLORGREEN,NODRAW;}%38.2:REFDATE(H61,DATE),POINTDOT,COLORMAGENTA,NODRAW;%19.8:REFDATE(H80,DATE),POINTDOT,COLORYELLOW,NODRAW; BOTTOM:REFDATE(低,DATE),POINTDOT,COLORWHITE,NODRAW; DRAWTEXT(ISLASTBAR,TOP,' ←%顶点'),COLORWHITE;DRAWTEXT(ISLASTBAR,%80.9,' ←%80.9'),COLORYELLOW; DRAWTEXT(ISLASTBAR,%61.8,' ←%61.8'),COLORMAGENTA; {DRAWTEXT(ISLASTBAR,%50.0,' ←%50.0'),COLORGREEN;} DRAWTEXT(ISLASTBAR,%38.2,' ←%38.2'),COLORMAGENTA; DRAWTEXT(ISLASTBAR,%19.8,' ←%19.1'),COLORYELLOW; DRAWTEXT(ISLASTBAR,BOTTOM,' ←%低点'),COLORWHITE;黑码启动组合{东方求败}股价:=(H+L+C)/3;股价运动:=股价,LINETHICK2,COLORBLUE;运动趋势:=XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA (XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XM A(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(X MA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA( XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(XMA(股价,3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3), 3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3), 3),3),3),3),3),3),3),3),3),3),3),3),3),3),3),3);良机区1:=运动趋势*0.9;良机区2:=运动趋势*0.875;良机区3:=运动趋势*0.85;涨1:=O<良机区3;求败1:IF(涨1,0.3,0),COLOR0000FF;涨2:=L<良机区2 AND 运动趋势>REF(运动趋势,1);求败2:IF(涨2,0.5,0),COLOR008000;涨3:=L<良机区3 AND 运动趋势>REF(运动趋势,1);求败3:IF(涨3,1,0),COLOR00FFFF;VAR6:=REF(LOW,1)*0.83;VAR7:=LOW*0.1;VAR8:=(VAR7*VOL+VAR6*(CAPITAL-VOL))/CAPITAL;VAR9:=EMA(VAR8,60);VARA:=EMA(VAR6,60);VARB:=VARA-2;VARC:=IF(C<=VAR9,VARB,VARA);{VARD:=MA(C,80)-MA(C,10)/17;}启动:=FILTER(VARC-VARB=0 ANDCROSS((EMA(EMA(EMA(C,2),2),2)-REF(EMA(EMA(EMA(C,2),2),2),1))/REF (EMA(EMA(EMA(C,2),2),2),1)*100,MA((EMA(EMA(EMA(C,2),2),2)-REF(EMA(EMA(EMA(C,2),2),2),1))/REF(EMA(EMA(EMA(C,2),2),2),1)*100,3)), 4);马启:IF(启动,1.5,0),COLORFFFFFF;{理想实现}VARS2:=IF(MONTH<12,1,1);VARS3:=(2.28*CLOSE+HIGH+LOW)/4;VARS4:=LLV(LOW,34);VARS5:=HHV(HIGH,34);理想:=EMA((VARS3-VARS4)/(VARS5-VARS4)*100,13)*VARS2,LINETHICK4,COL ORRED;论坛:=EMA(0.667*REF(理想,1)+0.333*理想,2),LINETHICK2,COLORFF9933; 理想实现:(CROSS(理想,论坛) AND 理想<22),LINETHICK2,COLOR0099FF; {横盘放量选股}横盘放量:LAST((H-L)/REF(C,1)<0.1,20,0) AND VOL>REF(VOL,1)*2 AND C>REF(C,1)*1.03AND "DMI.PDI">"DMI.MDI" AND CROSS("DMI.ADX","DMI.ADXR") AND"DMI.ADXR">"DMI.MDI" AND "DMI.PDI">"DMI.ADX"AND"KDJ.D">REF("KDJ.D",1);{STICKLINE(横盘放量,0,0.5,1,0),COLOR000099;}{笑傲江湖}DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26); {选股设JC=10即可}DEA:=EMA(DIFF,9);MACD:=2*(DIFF-DEA),COLORSTICK;A:=IF(CROSS(0,DEA),1,0);A1:=IF(DIFF<0 AND CROSS(DIFF,DEA),1,0);SS:=IF(A,SUM(A1,0),0);SSB:=HHV(SS,0);SSS:=SUM(A1,0);笑傲江湖:IF(SSS-SSB=2 AND SSS>REF(SSS,1),1.3,0),COLORFFFF00;{终结者}X:=1;LGL:=IF(EMA(C,5)/EMA(EMA(C,9),16)<=0.85 AND C/REF(C,1)>0.905 ANDC/REF(C,1)<1.05 AND VOL/CAPITAL*100<5,50,0);WR1:=-100*(HHV(HIGH,34)-CLOSE)/(HHV(HIGH,34)-LLV(LOW,34))+100*X; WR2:=-100*(HHV(HIGH,50)-CLOSE)/(HHV(HIGH,50)-LLV(LOW,50))+100; WR3:=-100*(HHV(HIGH,70)-CLOSE)/(HHV(HIGH,70)-LLV(LOW,70))+100*X; BIAS1:=((CLOSE-MA(CLOSE,34))/MA(CLOSE,34)*100+10)*5;BIAS2:=((CLOSE-MA(CLOSE,50))/MA(CLOSE,50)*100+10)*5;BIAS3:=((CLOSE-MA(CLOSE,70))/MA(CLOSE,70)*100+10)*5;S1:=(WR1+WR2+WR3+BIAS1+BIAS2+BIAS3)/6*X;S2:=EMA(S1,3);S3:=ABS(BIAS1-BIAS3);SX:=(S1+S3)/2;XC1:=(-1)*(EMA(100*(1-WINNER(CLOSE)),1)-50)+50;CCC:=XC1+SX;ZJZ:=IF( LGL>0 AND CCC<0,200,0)*X;LXL:=IF(SX<0 AND C=LLV(C,5) AND C/REF(C,1)>0.905 AND C/REF(C,1)<1.05 ANDVOL/CAPITAL*100<5,-50,0);JBJ:=IF(CCC<0 AND LXL=-50,100,0)*X;MA3:= MA(C,3);C0:=REF(C,2)*0.865;C1:=REF(C,13)*0.772;BOT:=MIN(C0,C1);HSL:=100*VOL/CAPITAL*X;MA13:=MA(C,13)*X;CXC:=IF((C-BOT)/C<3/100 AND SUM(HSL,5)/5<1.8,1,0);VMC:=IF(CXC>0 AND (LXL<0 OR LGL>0),100,0);V满仓:=VMC;V半仓A:=IF(((ZJZ>0 AND JBJ>0 AND SUM(VOL/CAPITAL*100,5)/5<1) OR (CXC>0 AND REF(C,1)/REF(C,2)>0.902)) OR(((ZJZ>0 AND JBJ>0 AND SUM(VOL/CAPITAL*100,5)/5<1) OR CXC>0) AND (LXL<0 OR LGL>0)) AND VMC<10 ,50,0) ;V93:=(((ZJZ>0 AND JBJ>0 AND SUM(VOL/CAPITAL*100,5)/5<1) OR CXC>0) AND (LXL<0 OR LGL>0)) ;V90:=((ZJZ>0 AND JBJ>0 AND SUM(VOL/CAPITAL*100,5)/5<1) OR (CXC>0 AND REF(C,1)/REF(C,2)>0.902));V半仓:=V93 OR V90;XMM87:=V满仓OR V半仓;XMM91:=VMC;G:=MA(CLOSE,80)-MA(CLOSE,10)/3*X;初级:=IF(XMM87>0,1.5,0),STICK,LINETHICK2;中级:IF(XMM91>0,1,0),STICK,COLORFF0080;高级:IF(VMC>0 AND CLOSE<G,1.5,0),STICK,LINETHICK2;{黑码底}DIFF1:=EMA(DCLOSE,12)-EMA(DCLOSE,26);DEA1:=EMA(DIFF1,9),COLORFFFF00;A01:=BARSLAST(REF(CROSS(DIFF1,DEA1),1));底背离:=REF(CLOSE,A01+1)>CLOSE AND DIFF1>REF(DIFF1,A01+1) AND CROSS(DIFF1,DEA1);DEA0:=EMA(DIFF1*100,9);MACD0:=2*(DIFF1*100-DEA0);黑码:=(MACD0>REF(MACD0,1)*2.5 AND MACD0>15);黑码0:(底背离AND 黑码),COLORFF8000;。
通达信指标公式源码最牛短线
通达信指标公式源码最牛短线通达信是中国股市常用的技术指标分析软件之一,其指标公式源码通常是使用C/C++语言编写。
以下是一个通达信中比较常用的短线指标公式源码示例:```cpp/**通达信最牛短线指标-动态平衡指标*公式:*DPT:=(CLOSE-LLV(LOW,34))/HHV(HIGH,34)*100;*DPB:=(HHV(HIGH,37)-CLOSE)/HHV(HIGH,37)*100;*DB:=DMA((DPT+DPB)/2,3);*BD:=DMA(DB,3);*返回值:*DB当日的DB值*BD当日的BD值*/extern "C" __declspec(dllexport) INT32 LuckyLineFLOAT*CLOSE,FLOAT*HIGH,FLOAT*LOW,INT32N,FLOAT*DB,FLOAT*BD) FLOATDPT[3];FLOATDPB[3];FLOATHHV_HIGH[3];FLOATLLV_LOW[3];for (INT32 i = 0; i < N; ++i)if (i < 34)HHV_HIGH[0]=HHV_HIGH[1]=HHV_HIGH[2]=HIGH[0];LLV_LOW[0]=LLV_LOW[1]=LLV_LOW[2]=LOW[0];}elseHHV_HIGH[0] = max(HIGH[i], HHV_HIGH[1]);HHV_HIGH[1]=HHV_HIGH[2];HHV_HIGH[2]=HHV_HIGH[0];LLV_LOW[0] = min(LOW[i], LLV_LOW[1]);LLV_LOW[1]=LLV_LOW[2];LLV_LOW[2]=LLV_LOW[0];}if (i < 37)DPB[0]=DPB[1]=DPB[2]=(HHV_HIGH[0]-CLOSE[0])/HHV_HIGH[0]*100; }DPB[0]=(HHV_HIGH[0]-CLOSE[0])/HHV_HIGH[0]*100;DPB[1]=(HHV_HIGH[1]-CLOSE[1])/HHV_HIGH[1]*100;DPB[2]=(HHV_HIGH[2]-CLOSE[2])/HHV_HIGH[2]*100;}if (i < 34)DPT[0]=DPT[1]=DPT[2]=(CLOSE[0]-LLV_LOW[0])/HHV_HIGH[0]*100; }elseDPT[0]=(CLOSE[0]-LLV_LOW[0])/HHV_HIGH[0]*100;DPT[1]=(CLOSE[1]-LLV_LOW[1])/HHV_HIGH[1]*100;DPT[2]=(CLOSE[2]-LLV_LOW[2])/HHV_HIGH[2]*100;}if (i >= 2)DB[i]=(DPT[0]+DPB[0])/2;BD[i]=(DB[i]+DB[i-1]+DB[i-2])/3;}}return 0;这是一个使用动态平衡指标计算当日的DB值和BD值的指标公式。
通达信短线无敌主图指标源码
通达信短线⽆敌主图指标源码以下是通达信短线⽆敌主图指标源码(⽆源码的请下载附件导⼊){⾊带}DRAWBAND(EXPMA(CLOSE,10),RGB(125,50,50),EXPMA(CLOSE,60),RGB(0,100,50));DRAWKLINE(H,O,L,C);{⾦⾊涨停}STICKLINE(C/REF(C,1)>1.095,C,O,2{⾦⾊涨停黄⾊芯宽度},0),COLORYELLOW;{蓝⾊跌停}C2:=REF(C,1);跌停:=IF((C2-C)*100/C2>=(10-0.01*100/C2),1,0);STICKLINE(跌停,OPEN,CLOSE,0.3,0),COLORFF0000;{通道⼀}MIDD:=MA(C,20);VART1:=POW((C-MIDD),2);VART2:=MA(VART1,20);VART3:=SQRT(VART2);UPPER:=MIDD+2*VART3;LOWER:=MIDD-2*VART3;{⾊带边线}操盘线:EXPMA(CLOSE,10),COLOR808080;DRAWNUMBER(ISLASTBAR,操盘线,操盘线),COLOR808080;强弱分界线:EXPMA(CLOSE,60),COLOR808080;DRAWNUMBER(ISLASTBAR,强弱分界线,强弱分界线),COLOR808080;{题材概念}Z1:=STRCAT(DYBLOCK,' ');Z2:=STRCAT(Z1,HYBLOCK);Z3:=STRCAT(Z2,' ');Z4:=STRCAT(Z3,GNBLOCK);Z5:=STRCAT(Z4,' ');Z6:=STRCAT(Z5,FGBLOCK);DRAWTEXT_FIX(ISLASTBAR,0.01,0.012,0,STRCAT(Z6,ZHBLOCK)),COLOR00FFFF;{主⼒吸货}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="">DRAWTEXT(FILTER(买=1,5),LOW-0.06,'↖主⼒吸货'),COLORYELLOW;STICKLINE(买,OPEN,CLOSE,0.3,0),COLOR00FFFF;{抄底逃顶}Z:=MA(C,120);VAR3:=(MA(C,5)-Z)/Z;VAR4:=MA((CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100,3);D1:DRAWTEXT(CLOSE>Z AND REF(VAR4,1)<30 and="" var4="">REF(VAR4,1) AND REF(VAR4,1)D2:DRAWTEXT(REF(VAR4,1)<7 and="" var4="">REF(VAR4,1) AND REF(VAR4,1)<-0.1,0.94*low>D3:DRAWTEXT(CROSS(VAR4,5) AND VAR3<-0.3,0.94*low>X:=MA(C,120);VAR5:=(MA(H,5)-X)/X;VAR6:=MA((CLOSE-LLV(LOW,10))/(HHV(HIGH,10)-LLV(LOW,10))*100,3);D41:DRAWTEXT(CROSS(95,VAR6) AND VAR5>0.3,H*1.02,'逃顶'),COLOR00FF00;D5:DRAWTEXT( CROSS(93,VAR6) AND HHV(H,30)/LLV(L,30)>1.1 AND REF(X,1)/X>0.997 ,H*1.02,'逃顶'),COLOR00FF00;D6:DRAWTEXT(CLOSE90 AND VAR6REF(VAR6,2) ,H*1.02,'逃顶'),COLOR00FF00;{抄底双线}抄底⼀:BOLL-2*STD(CLOSE,20),DOTLINE,COLORDB70DB;DRAWNUMBER(ISLASTBAR,抄底⼀,抄底⼀),COLORDB70DB;抄底⼆:REF(LOWER,1),DOTLINE,LINETHICK1,COLORDB70DB;DRAWNUMBER(ISLASTBAR,抄底⼆,抄底⼆),COLORDB70DB;{买点}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(MID,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*R DRAWNUMBER(ISLASTBAR,买点,买点),COLOR00FFFF;{⽀撑位}BDGD:=CROSS(0.8,H=HHV(H,6));GDSJ:=BARSLAST(BDGD)+1;前⾼点:=REF(H,GDSJ);BDDD:=CROSS(0.8,L=LLV(L,6));DDSJ:=BARSLAST(BDDD)+1;前低点:=REF(L,DDSJ);⽀撑位:IF(DDSJ<>DRAWNUMBER(ISLASTBAR,⽀撑位,⽀撑位),LINETHICK1,COLOR007FFF;{⽌损位}⽌损位:MA(买点,6),COLOR0000FF;DRAWNUMBER(ISLASTBAR,⽌损位,⽌损位),COLOR0000FF;{压⼒位}压⼒位:IF(GDSJ<>DRAWNUMBER(ISLASTBAR,压⼒位,压⼒位),COLORFF7F00;{卖出双线}卖出⼀:BOLL+2*STD(CLOSE,20),DOTLINE,COLOR00FF00;DRAWNUMBER(ISLASTBAR,卖出⼀,卖出⼀),COLOR00FF00;卖出⼆:REF(UPPER,1),DOTLINE,LINETHICK1,COLOR00FF00;DRAWNUMBER(ISLASTBAR,卖出⼆,卖出⼆),COLOR00FF00;{拐点}VARA:=4*SMA((CLOSE-LLV(LOW,4))/(HHV(HIGH,4)-LLV(LOW,4))*100,4,1)-3*SMA(SMA((CLOSE-LLV(LOW,4))/(HHV(HIGH,4)-LLV(LOW,4))*100,4,1),3.2,1);。
大盘研判通达信指标公式源码
大盘研判通达信指标公式源码一、Moving Average(简称MA):MA是最常用的一种技术指标,用于计算一段时间内的平均价格。
MA 的计算公式如下:MA(C,N)=SUM(C,N)/N其中,C代表收盘价,N代表时间周期。
二、Bollinger Bands(简称BOLL):BOLL是一个涨跌幅极限的指标,它由上轨、中轨和下轨组成。
BOLL 的计算公式如下:MA(C,N)=SUM(C,N)/NMD=SUM((C-MA(C,N))^2,N)/NUP=MA(C,N)+K*MDDN=MA(C,N)-K*MD其中,C代表收盘价,N代表时间周期,K代表标准差倍数。
三、Relative Strength Index(简称RSI):RSI是一种相对强弱指标,用于衡量价格变动的速度和幅度。
RSI的计算公式如下:RSI=N1/(N1+N2)*100其中,N1代表一段时间内上涨的幅度之和,N2代表一段时间内下跌的幅度之和。
四、Moving Average Convergence Divergence(简称MACD):MACD是一种用于判断趋势的指标,它由两个不同周期的移动平均线的差分组成。
MACD的计算公式如下:DIF=EMA(C,SHORT)-EMA(C,LONG)DEA=EMA(DIF,MID)MACD=2*(DIF-DEA)其中,C代表收盘价,EMA代表指数平滑移动平均线,SHORT、LONG和MID分别代表不同的时间周期。
五、Volume-weighted Average Price(简称VWAP):VWAP是一种以成交量加权的平均价格指标,用于衡量价格的有效性。
VWAP的计算公式如下:VWAP=SUM(P*V,N)/SUM(V,N)其中,P代表价格,V代表成交量,N代表时间周期。
短线王通达信指标公式源码
短线王通达信指标公式源码短线王指标是组合,资金动能指标,主流资金和短线王敢死队三个指标,一只股票没有机构,敢死队和拉升资金参与,不能成为一只强势股和妖股,这个指标一副图搞定。
没有机构,敢死队拉升资金参与的股票,千万不要在买了,买了都是浪费时间甚至赔钱。
换手1:=V*100/CAPITAL;主力:=MA(换手1,4);大户:=MA(换手1,9);中户:=MA(换手1,17);散户:=MA(换手1,34);均量:=(主力+大户+中户+散户)/4;主力能量:(主力-均量)*1,COLORYELLOW,NODRAW;操盘:STICKLINE(主力能量>=0AND主力能量>=REF(主力能量,1),14.4,14.4+主力能量,1.5,0),{COLORRED}COLORYELLOW;STICKLINE(1,0,0,1,0),POINTDOT,LINETHICK3,COL OR0000FF;Z_J1:=EMA(C,2)-EMA(C,150);Z_J2:=EMA(Z_J1,100);Z_J3:=2*(Z_J1-Z_J2);Z_J4:=POW(Z_J3,3)*0.1+POW(Z_J3,1);G_J1:=EMA(C,2)-EMA(C,89);G_J2:=EMA(G_J1,30);G_J3:=2*(G_J1-G_J2)*9.8;G_J4:=POW(G_J3,3)*0.1+POW(G_J3,2);进犯资金:IF(G_J3>0.015,G_J4,0)/28,LINETHICK2,COLORRED;DRAWICON(CROSS(攻击资金,0.015),攻击资金*0.95,9);QQ:=(((((MA(CLOSE,1)+MA(CLOSE,3))+MA(CLOSE,5))+ MA(CLOSE,7))+MA(CLOSE,9)) / 5);WW:=(((((MA(CLOSE,2)+MA(CLOSE,4))+MA(CLOSE,6 ))+MA(CLOSE,8))+MA(CLOSE,10)) / 5);A:=EMA(QQ,3);B:=EMA(WW,10);VAR1:=EMA(AMOUNT,1)/EMA(VOL,1)/100;AA:=DMA(A,VAR1);BB:=DMA(B,VAR1);VAR29:=MAX((2 * (AA - BB)),0) * 100;NHSH_:=EMA(VAR29,3),COLORFFFFFF;CB:=WINNER(CLOSE)*100;CC:=EMA(CB,2);追涨热度:=MAX((EMA(CC,2) - EMA(CC,5)),0),LINETHICK0,COLOR00FFFF;STICKLINE(1,0,0,1,0),POINTDOT,LINETHICK3;。
通达信指标公式源码板块强弱
通达信指标公式源码板块强弱通达信是一款流行的股票软件,在股票分析中经常会使用到其提供的指标功能,其中的板块强弱指标可以用来判断不同板块之间的相对强弱程度。
以下是通达信板块强弱指标的源码解析:1.源码解析通达信的板块强弱指标是通过计算不同板块内个股的涨跌幅和成交量来确定的。
具体的源码如下:```BLOCK1:MA((CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100,5);BLOCK2:MA((CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100,10);BLOCK3:MA((CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100,20);BLOCK4:MA((CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100,30);BLOCK5:MA((CLOSE-REF(CLOSE,1))/REF(CLOSE,1)*100,60);BLOCKUP:SUM(IF(BLOCK1>=BLOCK2,1,0),5);BLOCKSAME:SUM(IF(BLOCK1<BLOCK2,1,0)ANDIF(BLOCK2<BLOCK3,1,0)A NDIF(BLOCK3<BLOCK4,1,0)ANDIF(BLOCK4<BLOCK5,1,0),5);BLOCKINV:SUM(IF(BLOCK1<BLOCK2,1,0)ANDIF(BLOCK2>=BLOCK3,1,0)A NDIF(BLOCK3>=BLOCK4,1,0)ANDIF(BLOCK4>=BLOCK5,1,0),5);BLOCKSUM:BLOCKUP+BLOCKSAME+BLOCKINV;BLOCKRATIO:BLOCKUP/BLOCKSUM*100;```上述源码中使用了一些通达信提供的函数和运算符,下面对其中涉及的函数进行解释:-MA(N,M):求N日的简单移动平均线,M为平均的周期数。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
一个短线和波段结合的短线强弱指标
说明:强弱上穿平均时为关注点,当散户上穿主力时可快速介入,反之亦然!
若强弱线,平均线和散户线同时上穿主力时,那么你发财了!
UP:=SMA(IF(CLOSE>REF(CLOSE,1), CLOSE-REF(CLOSE,1),0),N,1);
DN:=SMA(IF (CLOSE<=REF(CLOSE,1),ABS(CLOSE-REF(CLOSE,1)),0),N,1);
指标:=100*UP/(UP+DN);
强弱:EMA(指标,3),COLORRED;
平均:EMA(强弱,3),COLORGREEN;
风险:80,COLOR8887EA;
安全:20,COLOR8887EA;
分界:50,CIRCLEDOT,LINETHICK2,COLORGREEN;
RSV:=(CLOSE-LLV(LOW,N1))/(HHV(HIGH,N1)-LLV(LOW,N1))*100;
K:=SMA(RSV,M1,1);
D:=EMA(K,M2);
PJJ:=DMA((HIGH+LOW+CLOSE*2)/4,0.9);
JJ:=REF(EMA(PJJ,3),1);
QJJ:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
XVL:=(IF(CLOSE>OPEN,QJJ*(HIGH-LOW),IF(CLOSE<OPEN,QJJ*(HIGH-OPEN+CLOSE-LO W),VOL/2))+IF(CLOSE>OPEN,0-QJJ*(HIGH-CLOSE+OPEN-LOW),IF(CLOSE<OPEN,0-QJJ *(HIGH-LOW),0-VOL/2)));
HSL:=(XVL/20)/1.15;
攻击流量:=((HSL*0.55+(REF(HSL,1)*0.33))+(REF(HSL,2)*0.22));
LLJX:=EMA(攻击流量,2);
资金流:=LLJX/1000;
卖出:IF(强弱<平均AND D<REF(D,1) AND 资金流<=0,50,DRAWNULL AND
MA(C,3)<REF(MA(C,3),1)),CIRCLEDOT,LINETHICK2,COLORGREEN;
观望:IF((强弱>=平均AND D>=REF(D,1) AND MA(C,3)>=REF(MA(C,3),1)) OR
(D>=REF(D,1) AND 资金流>0 AND MA(C,3)>=REF(MA(C,3),1)) OR(强弱>=平均AND 资金流>0 AND MA(C,3)>=REF(MA(C,3),1)) OR (强弱>=平均AND 资金流>0 AND
D>=REF(D,1)),50,DRAWNULL),CIRCLEDOT,LINETHICK2,COLORLIMAGENTA;
买进:IF(强弱>=平均AND D>=REF(D,1) AND 资金流>0 AND
MA(C,3)>=REF(MA(C,3),1),50,DRAWNULL),CIRCLEDOT,LINETHICK2,COLORRED;
VAR1:=1/WINNER(CLOSE);
VAR2:=MA(CLOSE,13);
VAR3:=100-ABS((CLOSE-VAR2)/VAR2*100);
VAR4:=LLV(LOW,75);
VAR5:=HHV(HIGH,75);
VAR6:=(VAR5-VAR4)/100;
VAR7:=SMA((CLOSE-VAR4)/VAR6,20,1);
VAR8:=SMA((OPEN-VAR4)/VAR6,20,1);
VAR9:=3*VAR7-2*SMA(VAR7,15,1);
VARA:=3*VAR8-2*SMA(VAR8,15,1);
VARB:=100-VARA;
VARC:=IF(900101<DATE AND DATE<99991230,1,0);
VARE:=REF(LOW,1)*0.9;
VARF:=LOW*0.9;
VAR10:=(VARF*VOL+VARE*(CAPITAL-VOL))/CAPITAL;
VAR11:=EMA(VAR10,30);
VAR12:=CLOSE-REF(CLOSE,1);
VAR13:=MAX(VAR12,0);
VAR14:=ABS(VAR12);{}
VAR15:=SMA(VAR13,7,1)/SMA(VAR14,7,1)*100;
VAR16:=SMA(VAR13,13,1)/SMA(VAR14,13,1)*100;
VAR17:=BARSCOUNT(CLOSE);
VAR18:=SMA(MAX(VAR12,0),6,1)/SMA(ABS(VAR12),6,1)*100;
VAR19:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100;
VAR1A:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100;
VAR1B:=SMA((SMA(VAR1A,4,1)-50)*2,3,1);
VAR1C:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100;
VAR1D:=SMA(VAR1C,4,1);
VAR1E:=SMA(VAR1D,3,1);
VAR1F:=(HHV(HIGH,30)-CLOSE)/CLOSE*100;
VAR20:=VAR18<=25 AND VAR19<-95 AND VAR1F>20 AND VAR1B<-30 AND VAR1E<30 AND VAR11-CLOSE>=-0.25 AND VAR15<22 AND VAR16<28 AND VAR17>50;
VAR21:=(HIGH+LOW+CLOSE)/3;
VAR22:=(VAR21-MA(VAR21,14))/(0.015*AVEDEV(VAR21,14));
VAR23:=(VAR21-MA(VAR21,70))/(0.015*AVEDEV(VAR21,70));
VAR24:=IF(VAR22>=150 AND VAR22<200 AND VAR23>=150 AND VAR23<200,10,0); VAR25:=IF(VAR22<=-150 AND VAR22>-200 AND VAR23<=-150 AND
VAR23>-200,-10,VAR24);
VAR26:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;
VAR27:=REVERSE(VAR26);
VAR28:=SMA(VAR26,3,1);
散户: SMA(VAR28,3,1)*VARC, , ;
主力: SMA(散户,3,1)*VARC, , COLORYELLOW;。