通达信富力量化优化主图指标源码
PMA:=MA(C,4),COLORWHITE,LINETHICK2;DDD:=多空线<REF(多空线,1);
IF(DDD,多空线,DRAWNULL),COLORYELLOW,LINETHICK2,NODRAW;A:=(PMA>多空线);
IF(A,多空线,DRAWNULL),COLOR33FF33,POINTDOT,LINETHICK4;
降:=HHV(EMA(C,3),8),COLORCYAN; 升:=LLV(EMA(C,3),8),COLORRED;走势:=EMA(C,3),COLORYELLOW;
线上多:IF(走势<降,降,DRAWNULL),COLOR9F9F5F,LINETHICK2;
线下空:IF(走势>升,升,DRAWNULL),COLOREEEE00,LINETHICK1;
T00:=200;AF1:=300;FX:=IF(C>REF(C,1),1,IF(C<REF(C,1),-1,0));
TT:=IF(PERIOD=0,BARSLAST(HOUR=9 AND MINUTE=31)+1,T00);
最高价:=CONST(HHV(H,TT));最低价:=CONST(LLV(L,TT));
单位:=CONST((最高价-最低价)/40);
多方:=SUM(IF(FX=1,V,0),TT)/SUM(V,TT)*100;
空方:=SUM(IF(FX=-1,V,0),TT)/SUM(V,TT)*100;
平衡:=SUM(IF(FX=0,V,0),TT)/SUM(V,TT)*100;
DRAWTEXT_FIX(1,0.005,0.9,0,STRCAT(STRCAT(STRCAT('多方:%',CON2STR(多方,1)),
STRCAT('平衡:',CON2STR(平衡,1))),STRCAT('空方:%',CON2STR(空方,1)))),COLORYELLOW;
DRAWTEXT_FIX(1,0.005,0.85,0,STRCAT('最小单位:',CON2STR(单位,3))),COLORLIGRAY;
F:=BARSCOUNT(CLOSE);AH:=HHV(HIGH,200);AL:=LLV(LOW,200);
B0:=(AH-AL)/40;B1:=HIGH+B0;B2:=LOW-B0;
DRAWTEXT((F+0)/34=FLOOR((F+0)/34),B2-2.2*B0*0.9,'变盘'),COLORFFFFFF;
ZDF:=(C-REF(C,1))/REF(C,1)*100;VAR2S:=(2*CLOSE+HIGH+LOW)/4;
VAR3S:=IF(YEAR>=2099 AND MONTH>2,0,1); VAR4S:=LLV(LOW,5); VAR5S:=HHV(HIGH,4);
散户:=EMA((VAR2S-VAR4S)/(VAR5S-VAR4S)*100,4)*VAR3S;
庄家:=EMA(0.667*REF(散户,1)+0.333*散户,2)*VAR3S;
DRAWTEXT(CROSS(散户,庄家) AND 散户<30,L-0.05,'←¥');
STICKLINE(CROSS(散户,庄家) AND 散户<30,O,C,3,0),COLORRED;
VAR2:=(REF(HIGH,1)+REF(LOW,1))/2;VAR3:=MA(CLOSE,13)+2*STD(CLOSE,13);
DRAWTEXT(CROSS(VAR2,VAR3),HIGH*1.02,'¥');VAR4:=REF(CLOSE,1);
VAR5:=SMA(MAX(CLOSE-VAR4,0),6,1)/SMA(ABS(CLOSE-VAR4),6,1)*100;
VAR6:=CROSS(79,VAR5);VAR7:=FILTER(VAR6,4);
DRAWTEXT(VAR7,HIGH*1.02,'¥');STICKLINE(VAR7,O,C,3,0),COLORFFFFFF;
- 上一篇公式:通达信KDJ日周同显 副图指标
- 下一篇公式:通达信变色均线主图源码