通达信易歌综合主图指标公式
通达信双线作战主图指标公式
通达信易歌综合主图指标公式:
S:=1;
DA1:=IF(130>TOTALBARSCOUNT,TOTALBARSCOUNT,130);
DA:=IF(CURRBARSCOUNT>DA1,0,DA1);
HI:=REFDATE(HHV(H,DA),DATE);
LO:=REFDATE(LLV(L,DA),DATE);
C1:=IF(CURRBARSCOUNT<=DA,C,DRAWNULL);
GZ:=EXP(LN(HI/LO)/10);
LH1:=SUM(IF(C1>=(HI/GZ),V,0),DA);
LH2:=SUM(IF(C1>=(HI/POW(GZ,2)) AND C1<(HI/GZ),V,0),DA);
LH3:=SUM(IF(C1>=(HI/POW(GZ,3)) AND C1<(HI/POW(GZ,2)),V,0),DA);
LH4:=SUM(IF(C1>=(HI/POW(GZ,4)) AND C1<(HI/POW(GZ,3)),V,0),DA);
LH5:=SUM(IF(C1>=(HI/POW(GZ,5)) AND C1<(HI/POW(GZ,4)),V,0),DA);
LH6:=SUM(IF(C1>=(HI/POW(GZ,6)) AND C1<(HI/POW(GZ,5)),V,0),DA);
LH7:=SUM(IF(C1>=(HI/POW(GZ,7)) AND C1<(HI/POW(GZ,6)),V,0),DA);
LH8:=SUM(IF(C1>=(HI/POW(GZ,8)) AND C1<(HI/POW(GZ,7)),V,0),DA);
LH9:=SUM(IF(C1>=(LO*GZ) AND C1<LO*POW(GZ,2),V,0),DA);
LH10:=SUM(IF(C1>=LO AND C1<LO*GZ,V,0),DA);
L1:=REFDATE(HHV(LH1,DA),DATE),LINETHICK0;
L2:=REFDATE(HHV(LH2,DA),DATE),LINETHICK0;
L3:=REFDATE(HHV(LH3,DA),DATE),LINETHICK0;
L4:=REFDATE(HHV(LH4,DA),DATE);
L5:=REFDATE(HHV(LH5,DA),DATE);
L6:=REFDATE(HHV(LH6,DA),DATE);
L7:=REFDATE(HHV(LH7,DA),DATE);
L8:=REFDATE(HHV(LH8,DA),DATE);
L9:=REFDATE(HHV(LH9,DA),DATE);
L10:=REFDATE(HHV(LH10,DA),DATE);
SS:=(L1+L2+L3+L4+L5+L6+L7+L8+L9+L10);
stICKLINE(CEILING(DA*L1/SS)*3>=CURRBARSCOUNT,HI*99/100,HI/GZ,9,0)COLOR3C3C3A,LINETHICK3;
STICKLINE(CEILING(DA*L2/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,1)*99/100,HI/POW(GZ,2),9,0)COLOR3C3C3A,LINETHICK3;
STICKLINE(CEILING(DA*L3/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,2)*99/100,HI/POW(GZ,3),9,0)COLOR3C3C3A,LINETHICK3;
STICKLINE(CEILING(DA*L4/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,3)*99/100,HI/POW(GZ,4),9,0)COLOR3C3C3A,LINETHICK3;
STICKLINE(CEILING(DA*L5/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,4)*99/100,HI/POW(GZ,5),9,0)COLOR3C3C3A,LINETHICK3;
STICKLINE(CEILING(DA*L6/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,5)*99/100,HI/POW(GZ,6),9,0)COLOR3C3C3A,LINETHICK3;
STICKLINE(CEILING(DA*L7/SS)*3>=CURRBARSCOUNT,HI/POW(GZ,6)*99/100,HI/POW(GZ,7),9,0)COLOR3C3C3A,LINETHICK3;
STICKLINE(CEILING(DA*L8/SS)*3>=CURRBARSCOUNT,LO*POW(GZ,2),LO*POW(GZ,3)*99/100,9,0)COLOR3C3C3A,LINETHICK3;
STICKLINE(CEILING(DA*L9/SS)*3>=CURRBARSCOUNT,LO*POW(GZ,1),LO*POW(GZ,2)*99/100,9,0)COLOR3C3C3A,LINETHICK3;
STICKLINE(CEILING(DA*L10/SS)*3>=CURRBARSCOUNT,LO,LO*POW(GZ,1)*99/100,9,0)COLOR3C3C3A,LINETHICK3;
N:=10;
LL:=REF(L,1);
HH:=REF(H,1);
SQK:=L>HH;
XQK:=H<LL;
向上跳几元钱:IF(SQK=1,L-HH,DRAWNULL),COLORGREEN,crOSSDOT,LINETHICK3,NODRAW;
逃命跳空元:IF(XQK=1,H-LL,DRAWNULL),COLORYELLOW,CROSSDOT,LINETHICK3,NODRAW;
DRAWTEXT(SQK,L*0.92,' 跳升'),COLORRED;
DRAWTEXT(XQK,H*1.08,' 跳跌'),COLORGREEN;
STICKLINE(SQK,L,HH,5*N,1),COLORRED;
STICKLINE(XQK,H,LL,5*N,2),COLORGREEN;
DRAWKLINE(H,O,L,C);
DRAWTEXT(CURRBARSCOUNT=98,LOW*0.88,'压力越大暗条越长,做多越短越好'),COLORYELLOW;
N250:=250;
PT250:=CONST(HHVBARS(V,N250));
T250:IF(CURRBARSCOUNT<=N250,CONST(IF(PT250=0,C,REF(C,PT250))),DRAWNULL),COLOR990000,LINETHICK2;
IF(CURRBARSCOUNT=PT250+1,T250*1.01,DRAWNULL),CIRCLEDOT,COLORFF0000,LINETHICK2;
DRAWTEXT(CURRBARSCOUNT=N250,T250,'250'),COLOR990000;
N120:=120;
PT120:=CONST(HHVBARS(V,N120));
T120:IF(CURRBARSCOUNT<=N120,CONST(IF(PT120=0,C,REF(C,PT120))),DRAWNULL),COLORAAAA00,LINETHICK2;
IF(CURRBARSCOUNT=PT120+1,T120,DRAWNULL),CIRCLEDOT,COLORFFFF00,LINETHICK2;
DRAWTEXT(CURRBARSCOUNT=N120,T120,'120'),COLORAAAA00;
N60:=60;
PT60:=CONST(HHVBARS(V,N60));
T60:IF(CURRBARSCOUNT<=N60,CONST(IF(PT60=0,C,REF(C,PT60))),DRAWNULL),COLOR00BB00,LINETHICK2;
IF(CURRBARSCOUNT=PT60+1,T60,DRAWNULL),CIRCLEDOT,COLOR00FF00,LINETHICK2;
DRAWTEXT(CURRBARSCOUNT=N60,T60,'60'),COLOR00BB00;
N30:=30;
PT30:=CONST(HHVBARS(V,N30));
T30:IF(CURRBARSCOUNT<=N30,CONST(IF(PT30=0,C,REF(C,PT30))),DRAWNULL),COLOR0000CC,LINETHICK2;
IF(CURRBARSCOUNT=PT30+1,T30,DRAWNULL),CIRCLEDOT,COLOR0000FF,LINETHICK2;
DRAWTEXT(CURRBARSCOUNT=N30,T30,'30'),COLOR0000CC;
N20:=20;
PT20:=CONST(HHVBARS(V,N20));
T20:IF(CURRBARSCOUNT<=N20,CONST(IF(PT20=0,C,REF(C,PT20))),DRAWNULL),COLORDD00DD,LINETHICK2;
IF(CURRBARSCOUNT=PT20+1,T20,DRAWNULL),CIRCLEDOT,COLORFF00FF,LINETHICK2;
DRAWTEXT(CURRBARSCOUNT=N20,T20,'20'),COLORDD00DD;
N10:=10;
PT10:=CONST(HHVBARS(V,N10));
T10:IF(CURRBARSCOUNT<=N10,CONST(IF(PT10=0,C,REF(C,PT10))),DRAWNULL),COLOR00EEEE,LINETHICK2;
IF(CURRBARSCOUNT=PT10+1,T10,DRAWNULL),CIRCLEDOT,COLOR00FFFF,LINETHICK2;
DRAWTEXT(CURRBARSCOUNT=N10,T10,'10'),COLOR00EEEE;
N5:=5;
PT5:=CONST(HHVBARS(V,N5));
T5:IF(CURRBARSCOUNT<=N5,CONST(IF(PT5=0,C,REF(C,PT5))),DRAWNULL),COLORFFFFFF,LINETHICK2;
IF(CURRBARSCOUNT=PT5+1,T5,DRAWNULL),CIRCLEDOT,COLORFFFFFF,LINETHICK2;
DRAWTEXT(CURRBARSCOUNT=N5,T5,'5'),COLORFFFFFF;
DRAWKLINE(H,O,L,C);
股浪:=CROSS(C,T5),COLORFFFFFF,LINETHICK2;
T1:=CONST(HHVBARS(V,10)),COLOR0000FF,LINETHICK1;
量能平台:IF(CURRBARSCOUNT<=N+15,CONST(IF(T1=0,C,REF(C,T1))),DRAWNULL),COLOR4080FF,LINETHICK3;
新量能点:IF(CURRBARSCOUNT=T1+1,量能平台,DRAWNULL),CIRCLEDOT,COLORFFFFFF,LINETHICK9;
DRAWTEXT(ISLASTBAR,量能平台,' 量能平台'),COLOR00F0F0;
DRAWTEXT_FIX(1,0.00,0,0,'所属行业:')COLOR00FFFF;
DRAWTEXT_FIX(1,0.06,0,0,HYBLOCK)COLOR00FFFF;
DRAWTEXT_FIX(1,0.14,0,0,'所属地区:')COLOR00FFFF;
DRAWTEXT_FIX(1,0.20,0,0,DYBLOCK)COLOR00FFFF;
DRAWTEXT_FIX(1,0.30,0.00,0,'主题投资:')COLOR00FFFF;
DRAWTEXT_FIX(1,0.36,0.00,0,EXTERNSTR(0,2))COLOR00FFFF;
DRAWTEXT_FIX(1,0.00,0.05,0,'主营业务:')COLOR00FFFF;
DRAWTEXT_FIX(1,0.06,0.05,0,EXTERNSTR(0,3))COLOR00FFFF;
DRAWTEXT_FIX(1,0.00,0.10,0,'解禁日期:')COLOR00FFFF;
DRAWTEXT_FIX(1,0.06,0.10,0,EXTERNSTR(0,4))COLOR00FFFF;
DRAWTEXT_FIX(1,0.00,0.15,0,'愚民概念:'),COLOR00FFFF;
DRAWTEXT_FIX(1,0.06,0.15,0,EXTERNSTR(0,5)),COLOR00FFFF;
DRAwrECTREL(0,500,135,999.4,IF(120,RGB(10,0,0),0));
超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.85,0,STRCAT('',CON2STR(主力进/10,0))),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.033,0.85,0,STRCAT('',CON2STR(主力出/10,0))),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.07,0.85,0,STRCAT('',CON2STR(小散进/10,0))),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.101,0.85,0,STRCAT('',CON2STR(小散出/10,0))),COLORYELLOW;
DRAWTEXT_FIX(CURRBARSCOUNT=1,0.033,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;
涨家数:INDEXADV,COLOR0080FF,NODRAW;
跌家数:INDEXDEC,COLORGREEN,NODRAW;
K1:=REF(C,1)=DYNAINFO(3) AND O=DYNAINFO(4) AND C=DYNAINFO(7) AND H=DYNAINFO(5) AND L=DYNAINFO(6);
K2:=BArslAST(V=HHV(V,20));
K3:=BacKSET(K1,K2+1);
STICKLINE(K2=0 AND K3=1,H,H*1.003,8*N,0),COLORYELLOW;
收:C,NODRAW;
DRAWTEXT(S=1&&K2=0&&K3=1,H*1.02,'20天内最高量的'),COLORGREEN;
DRAWTEXT(S=1&&K2=0&&K3=1,H*0.98,'当天最高价划线'),COLORGREEN;
STICKLINE((CLOSE>(REF(C,1)))AND(CLOSE/(REF(C,1))>1.05),CLOSE,OPEN,2,0),COLORFF00FF ;
STICKLINE((CLOSE<(REF(C,1)))AND((REF(C,1))/CLOSE>1.05),CLOSE,OPEN,2,0),COLOR009900;
ST1:=NAMELIKE('ST');
ST2:=NAMELIKE('*ST');
{涨停k线图}
ZT:=(C-REF(C,1))/REF(C,1)*100>9.92;
ZTST:=(C-REF(C,1))/REF(C,1)*100>4.92;
涨停:=ST1=0 AND ST2=0 AND ZT;
涨停ST:=(ST1=1 OR ST2=1) AND ZTST;
STICKLINE(涨停 OR 涨停ST,C,O,3,0),COLORYELLOW;
STICKLINE(涨停 OR 涨停ST,C,O,2,0),COLORYELLOW;
STICKLINE(涨停 OR 涨停ST,C,O,1,0),COLORYELLOW;
{跌停k线图}
DT:=(C-REF(C,1))/REF(C,1)*100<-9.92;
DTST:=(C-REF(C,1))/REF(C,1)*100<-4.92;
跌停:=ST1=0 AND ST2=0 AND DT;
跌停ST:=(ST1=1 OR ST2=1) AND DTST;
STICKLINE(跌停 OR 跌停ST,C,O,3,0),COLORFF0000 ;
STICKLINE(跌停 OR 跌停ST,C,O,2,0),COLORFF0000 ;
STICKLINE(跌停 OR 跌停ST,C,O,1,0),COLORFF0000 ;
MA5:MA(CLOSE,4),DOTLINE,COLORGREEN;
IF(MA5>REF(MA5,1),MA5,DRAWNULL)COLORYELLOW,LINETHICK3;
MA10:MA(CLOSE,10),COLORRED,DOTLINE;
IF(MA10>REF(MA5,1),MA10,DRAWNULL)COLORRED,DOTLINE,COLORGREEN;
MA250:MA(CLOSE,250),COLORRED;
IF(MA250>REF(MA5,1),MA250,DRAWNULL)COLORRED,COLORGREEN;
AA节:=(360*FRACPART(((DATETODAY(DATE)-21)/(365/360))/360)),NODRAW;
A节:=INTPART(AA节/15)+1,NODRAW;节N:=A节!=REF(A节,1);
AHZ:=HHV(H,200); ALZ:=LLV(L,200); BZ0:=(AHZ-ALZ)/40;
STICKLINE(A节!=REF(A节,1),C,C-BZ0,1,1),COLOR00FFFF;
节气:=IF(节N AND A节=3,'立春',IF(节N AND A节=4 ,'雨水',IF(节N AND A节=5,'惊蛰',IF(节N AND A节=6,'春分',
IF(节N AND A节=7,'清明',IF(节N AND A节=8,'谷雨',IF(节N AND A节=9,'立夏',IF(节N AND A节=10,'小满',
IF(节N AND A节=11,'芒种',IF(节N AND A节=12,'夏至',IF(节N AND A节=13,'小暑',IF(节N AND A节=14,'大署',
IF(节N AND A节=15,'立秋',IF(节N AND A节=16,'处暑',IF(节N AND A节=17,'白露',IF(节N AND A节=18,'秋分',
IF(节N AND A节=19,'寒露',IF(节N AND A节=20,'霜降',IF(节N AND A节=21 ,'立冬',IF(节N AND A节=22,'小雪',
IF(节N AND A节=23,'大雪',IF(节N AND A节=24,'冬至',IF(节N AND A节=1,'小寒',IF(节N AND A节=2,'大寒',
DRAWNULL))))))))))))))))))))))));DRAWTEXT(1,H+BZ0,节气),COLOR00FFFF;
月节:=IF(REFDATE(MONTH,DATE)=1,'小寒5日-7日大寒20日-22日',IF(REFDATE(MONTH,DATE)=2,'立春3日-5日雨水18日-20日',
IF(REFDATE(MONTH,DATE)=3,'惊蛰5日-7日春分20日-22日',IF(REFDATE(MONTH,DATE)=4,'清明4日-6日谷雨19日-21日',
IF(REFDATE(MONTH,DATE)=5,'立夏5日-7日小满20日-22日',IF(REFDATE(MONTH,DATE)=6,'芒种5日-7日夏至21日-23日',
IF(REFDATE(MONTH,DATE)=7,'小暑6日-8日大暑22日-24日',IF(REFDATE(MONTH,DATE)=8,'立秋7日-9日处暑22日-24日',
IF(REFDATE(MONTH,DATE)=9,'白露7日-9日秋分22日-24日',IF(REFDATE(MONTH,DATE)=10,'寒露8日-10日霜降23日-25日',
IF(REFDATE(MONTH,DATE)=11,'立冬7日-9日小雪22日-24日',IF(REFDATE(MONTH,DATE)=12,'大雪6日-8日冬至21日-23日',
DRAWNULL)))))))))))); 今日:=DATE+19000000,NODRAW;
输节K:=STRCAT(CON2STR(今日,0),STRCAT('■农历节气',月节));
DRAWTEXT_FIX(1,0.70,0.02,1,输节K),COLORWHITE;
提示:=0;
五:MA(CLOSE,5),LINETHICK0,COLORMAGENTA,NODRAW;
十:MA(CLOSE,10),LINETHICK0,COLORMAGENTA,NODRAW;
离A:MA(CLOSE,7)*1.05,COLORC0C0C0;
离C:MA(CLOSE,7)*0.955,COLORC0C0C0;
β0:=(H-L)/2+L;
α:=β0,LINETHICK0;
β:=REF(β0,1),LINETHICK0,COLORGREEN;
γ:=REF(β0,2),LINETHICK0,COLORMAGENTA;
通达信天下黄金指标公式