您的当前位置:首页正文

通达信指标公式源码完美顺势而为指标

2023-11-01 来源:步旅网
通达信指标公式源码完美顺势而为指标

{========顺势而为=====主图==============} VAR1:=(C+H+O+L)/4;

卖出:=XMA(VAR1,20)*(1+80/1000); 买入:=XMA(VAR1,32)*(1-100/1000); 标准:=买入+(卖出-买入)*2/3;

{=========================================}

赢:=MA(C,1);

在:=SMA(SMA(SMA(赢,2,1),2,1),2,1); 龙:=MA(在,3);

{=========================================}

赢在龙头:=(L+H+C*4)/6;

趋势轨①:EMA(赢在龙头,12),NODRAW; 趋势轨②:EMA(赢在龙头,19),NODRAW; 趋势轨③:IF(L>在,在,龙),NODRAW;

赢在:=(趋势轨①-REF(趋势轨①,1))/REF(趋势轨①,1)*100; 龙头:=(趋势轨②-REF(趋势轨②,1))/REF(趋势轨②,1)*100; G:=BARSLAST(CROSS(赢在,0))+1; 止损线A:REF(L,G),NODRAW;

止损线B:REF(止损线A,BARSLAST(止损线A>REF(止损线A,1) OR 止损线

A 趋势①拐点:=CROSS(赢在,0);

{************************************************************} 换手:=V*100/CAPITAL;

主力:=MA(换手,4); 大户:=MA(换手,9); 中户:=MA(换手,17); 散户:=MA(换手,34);

均量:=(主力+大户+中户+散户)/4; 机构意愿:=(主力-均量); 游资意愿:=(大户-均量); 大户意愿:=(中户-均量); 散户意愿:=(散户-均量);

顺大势:=趋势①拐点AND NOT(散户意愿<0 AND 大户意愿<0) AND (机构意愿>0 OR 机构意愿<0) AND 止损线A>REF(止损线A,1) AND H<标准,NODRAW; {---------------------------------------------}

{阴线-兰色}{阳线-红色}

STICKLINE(C>=O,C,O,3,0),COLOR0000AA; STICKLINE(C>=O,C,O,2.5,0),COLOR0000BB ; STICKLINE(C>=O,C,O,1.5,0),COLOR0000CC ; STICKLINE(C>=O,C,O,1,0),COLOR0000EE; STICKLINE(C>=O,H,L,0,0),COLOR0000FF; STICKLINE(C<=O,C,O,3,0),COLOR7B7B00;

STICKLINE(C<=O,C,O,2.5,0),COLOR909000; STICKLINE(C<=O,C,O,1.5,0),COLORA8A800; STICKLINE(C<=O,C,O,1,0),COLORCECE00; STICKLINE(C<=O,H,L,0,0),COLORFFFF00;

{===========================================} DRAWBAND(在,RGB(249,245,246),龙,RGB(0,224,224));

IF(

>=0,

②,DRAWNULL),COLORMAGENTA,LINETHICK2;

IF(龙头<0,趋势轨②,DRAWNULL),COLORBLUE,LINETHICK2; IF(赢在>=0,趋势轨①,DRAWNULL),COLOR0000FF,LINETHICK2; IF(赢在<0,趋势轨①,DRAWNULL),COLORGREEN,LINETHICK2; IF(IF(

DRAWICON(顺大势,L*0.98,5);

DRAWTEXT(顺大势,L*0.98,' ←顺势而为'),COLORCCCCCC; {般:=XMA(CLOSE,7); 若:=MEMA(CLOSE,3);

预警:=LONGCROSS(若,般,3) AND C>标准;

确认:=BARSLAST(LONGCROSS(若,般,3) AND C>标准)=1; DRAWICON(预警AND COUNT(预警,BARSLAST(顺大势))=1,H*1.02,6);

DRAWICON(确认

力做

AND 码盘

COUNT(确==

图意

认,BARSLAST(顺大势))=1,H,2);};

{=============================}

散户跟风意 愿

:(WINNER(MA(CLOSE,5)*1.1)-力

愿:WINNER(MA(CLOSE,5))*100,LINETHICK5,COLORRED;

赢在

在>0,REF(L,G),DRAWNULL),COLORRED,POINTDOT,LINETHICK4; <0,REF(L,G),DRAWNULL),COLORGREEN,POINTDOT,LINETHICK4;

WINNER(MA(CLOSE,5)*0.9))*100,LINETHIC

K5,COLORGREEN;

标准:60,LINETHICK2,COLORYELLOW; {=============VAR2:=REF(VAR1,18); VAR3:=MA(VAR2,18); 个

度:C/MA(REF(C,18),18)*100,COLOR0BFFFF,LINETHICK2; 个股风险:MA(FORCAST(个股趋势强度,20),6),COLORRED;

大盘趋势强度:VAR1/VAR3*100,COLORF4E202,LINETHICK2; 大盘风险:MA(FORCAST(大盘趋势强度,20),6),COLORGREEN;

==

================} VAR1:=INDEXC;

因篇幅问题不能全部显示,请点此查看更多更全内容