主力趋势中线主图公式

[复制链接]
查看100 | 回复0 | 2022-7-24 06:33:32 | 显示全部楼层 |阅读模式

主力趋势中线主图公式

{开始---主力趋势指标}
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),COLORFF00FF;
指数趋势:=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-REF(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);

712599275.jpg

712599275.jpg

 

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则