通达信富力量化优化主图指标源码
OMA:MA(C,5),COLORWHITE,LINETHICK2;
IF(OMA>REF(OMA,1),OMA,DRAWNULL),COLORRED,LINETHICK2;
IF(OMA<REF(OMA,1),OMA,DRAWNULL),COLORGREEN,LINETHICK2;
E:=(HIGH+LOW+OPEN+2*CLOSE)/5;明日阻力:=2*E-LOW,NODRAW;
明日支撑:=2*E-HIGH;明日突破:=E+(HIGH-LOW);明日反转:=E-(HIGH-LOW);
今日阻力:=REF(明日阻力 , 1);今日支撑:=REF(明日支撑 , 1);
DRAWTEXT_FIX(ISLASTBAR,0.6,0.05,0, '【动态读盘(元)】'),COLOR767676;
DRAWTEXT_FIX(ISLASTBAR,0.6,0.1,0,'明日阻力'),COLOR545454;
DRAWNUMBER_FIX(ISLASTBAR,0.7,0.1,0,明日阻力),COLOR545454;
DRAWTEXT_FIX(ISLASTBAR,0.6,0.15,0,'明日支撑'),COLOR545454;
DRAWNUMBER_FIX(ISLASTBAR,0.7,0.15,0,明日支撑),COLOR545454;
DRAWTEXT_FIX(ISLASTBAR,0.6,0.2,0,'明日突破'),COLOR545454;
DRAWNUMBER_FIX(ISLASTBAR,0.7,0.2,0,明日突破),COLOR545454;
DRAWTEXT_FIX(ISLASTBAR,0.6,0.25,0,'明日反转'),COLOR545454;
DRAWNUMBER_FIX(ISLASTBAR,0.7,0.25,0,明日反转),COLOR545454;
DRAWTEXT_FIX(ISLASTBAR,0.6,0.3,0,'今日阻力'),COLOR545454;
DRAWNUMBER_FIX(ISLASTBAR,0.7,0.3,0,今日阻力),COLOR545454;
DRAWTEXT_FIX(ISLASTBAR,0.6,0.35,0,'今日支撑'),COLOR545454;
DRAWNUMBER_FIX(ISLASTBAR,0.7,0.35,0,今日支撑),COLOR545454;
DRAWTEXT_FIX(1,0.04,0.04,0, '【动态读盘(手)】'),COLORFFFF00;
DRAWTEXT_FIX(1,0.01,0.08,0,'当日买卖量='),COLOR6B8E23;
DRAWTEXT_FIX(1,0.01,0.15,0,'日主动买量='),COLOR6B8E23;
DRAWTEXT_FIX(1,0.01,0.22,0,'日主动卖量='),COLOR6B8E23;
DRAWTEXT_FIX(1,0.01,0.29,0,'当日买卖比='),COLOR6B8E23;
DRAWTEXT_FIX(1,0.01,0.36,0,'买入累计万元: '),COLOR6B8E23;
DRAWTEXT_FIX(1,0.01,0.43,0,'卖出累计万元: '),COLOR6B8E23;
AAAA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
主动买盘:=IF(CLOSE>OPEN,AAAA*(HIGH-LOW),IF(CLOSE<OPEN,AAAA*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2));
主动卖盘:=IF(CLOSE>OPEN,AAAA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,AAAA*(HIGH-LOW),VOL/2));
买卖比:=主动买盘/主动卖盘;WJ:=(HIGH+LOW+CLOSE)/3;
VD1:=IF(HIGH=LOW,1,HIGH-MAX(OPEN,CLOSE));
VD2:=IF(HIGH=LOW,1,MAX(CLOSE,OPEN)-WJ);
VD3:=IF(HIGH=LOW,1,MIN(OPEN,CLOSE)-LOW);
VD4:=IF(HIGH=LOW,1,WJ-MIN(CLOSE,OPEN));
VD5:=VOL/IF(HIGH=LOW,4,HIGH-LOW);
VD6:=(VD1*VD5);VD7:=(VD2*VD5);VD8:=(VD3*VD5);VD9:=(VD4*VD5);
买入量:=(VD9+VD8);卖出量:=(VD6+VD7);
买入资金:=买入量*CLOSE/100;卖出资金:=卖出量*CLOSE/100;
DRAWNUMBER_FIX(1,0.11,0.08,0,CONST(VOL)),COLOR00FFFF;
DRAWNUMBER_FIX(1,0.11,0.15,0,CONST(主动买盘)),COLORFF00FF;
DRAWNUMBER_FIX(1,0.11,0.22,0,CONST(主动卖盘)),COLORFFFFFF;
DRAWNUMBER_FIX(1,0.11,0.29,0,CONST(买卖比)),COLOR00FF00;
DRAWNUMBER_FIX(1,0.11,0.36,0,CONST(买入资金)),COLOR00FFFF;
DRAWNUMBER_FIX(1,0.11,0.43,0,CONST(卖出资金)),COLORRED;
Z1:=STRCAT(HYBLOCK,' ');Z2:=STRCAT(Z1,DYBLOCK);Z3:=STRCAT(Z2,' ');
DRAWTEXT_FIX(ISLASTBAR,0,0,0,STRCAT(Z3,GNBLOCK)),COLOR656565;HAN:=DATE<1141230;
当前获利筹码:=IF(WINNER(CLOSE),WINNER(CLOSE)*100,0);DRAWKLINE(H,O,L,C);
九十成本集中:=(COST(95)-COST(5))/(COST(95)+COST(5))*100;
成本价:COST(九十成本集中),LINETHICK2,POINTDOT,COLORFFFFFF;
入1:IF(成本价>REF(成本价,1),成本价,DRAWNULL),COLORFFFFFF,POINTDOT,LINETHICK2;
出1:IF(成本价<REF(成本价,1),成本价,DRAWNULL),COLORFFFFFF,POINTDOT,LINETHICK2;
K9:EXPMA(C,100),COLOR212121,DOTLINE;
K10:EXPMA(C,112),COLOR212121,DOTLINE;
K11:EXPMA(C,124),COLOR111111,DOTLINE;
K12:EXPMA(C,138),COLOR212121,DOTLINE;
底部支撑:HHV(MA(L,11),98),COLOR9F9F5F,DOTLINE;
压力1:MA(底部支撑,12),COLOR656565,DOTLINE;
压力2:MA(底部支撑,18),COLOR545454,DOTLINE;
压力3:MA(底部支撑,24),COLOR434343,DOTLINE;
压力4:MA(底部支撑,30),COLOR323232,LINETHICK1,DOTLINE;
AA:=EMA(C,5) > EMA(C,20);
BB:=EMA(C,5) < EMA(C,20);CC:= EMA(C,5) > EMA(C,10);
CC1:=EMA(C,5) < EMA(C,10);DD:=CLOSE<OPEN;
STICKLINE(AA,H,L,0,0),COLOR7F7F5F;
STICKLINE(AA,O,C,3,1),COLOR7F7F5F;
STICKLINE(AA AND DD,O,C,3,1),COLOR7F7F5F;
STICKLINE(AA AND DD,O,C,1,0),COLORFF0400;
STICKLINE(BB,H,L,0,1),COLORFF0400;
STICKLINE(BB,O,C,3,1),COLORFF0400;
STICKLINE(BB,O,C,1,0),COLOR9F9F5F;
STICKLINE(BB AND DD,O,C,3,1),COLORFF0400;
STICKLINE(BB AND DD,O,C,1,1),COLOR212121;
STICKLINE(BB AND DD,O,C,1,0),COLORFF0400;
STICKLINE(BB AND CC,H,L,0,1),COLORWHITE;
STICKLINE(BB AND CC,O,C,3,1),COLORWHITE;
STICKLINE(BB AND CC,O,C,1,0),COLOR7F7F5F;
STICKLINE(BB AND CC AND DD,O,C,3,1),COLORWHITE;
STICKLINE(BB AND CC AND DD,O,C,1,0),COLORFF0400;
STICKLINE(AA AND CC1,H,L,0,0),COLORWHITE;
STICKLINE(AA AND CC1,O,C,3,1),COLORWHITE;
STICKLINE(AA AND CC1,O,C,1,0),COLOR7F7F5F;
STICKLINE(AA AND CC1 AND DD,O,C,3,1),COLORWHITE;
STICKLINE(AA AND CC1 AND DD,O,C,1,0),COLORFF0400;
AAA:=CONST(HHV(C,90));X:=(3*C+L+O+H)/6;
多空线:(20*X+19*REF(X,1)+18*REF(X,2)+17*REF(X,3)+16*REF(X,4)+15*REF(X,5)+14*REF(X,6)
+13*REF(X,7)+12*REF(X,8)+11*REF(X,9)+10*REF(X,10)+9*REF(X,11)+8*REF(X,12)
+7*REF(X,13)+6*REF(X,14)+5*REF(X,15)+4*REF(X,16)+3*REF(X,17)+2*REF(X,18)+
REF(X,20))/210,COLORMAGENTA,LINETHICK1,NODRAW;
- 上一篇公式:通达信KDJ日周同显 副图指标
- 下一篇公式:通达信变色均线主图源码