1. 股票论坛首页
  2. 股票公式
  3. 通达信公式

新黄金分割

指标说明及代码

{新黄金分割}

MA1:INTPART(MA(CLOSE,5)*100)/100;

MA2:INTPART(MA(CLOSE,10)*100)/100;

MA3:INTPART(MA(CLOSE,20)*100)/100;

MA4:=MA(CLOSE,60);

MA5:=MA(CLOSE,120);

MA6:=MA(CLOSE,250);

实收价:=IF(FRACPART(C*100)>0.46,CEILING(C*100)/100,FLOOR(C*100)/100);

柒%阳:=实收价>=IF(FRACPART(REF(实收价,1)*107)>0.46,CEILING(REF(实收价,1)*107)/100,FLOOR(REF(实收价,1)*107)/100);

涨停:=实收价 >=IF(FRACPART(REF(实收价,1)*110)>0.46,CEILING(REF(实收价,1)*110)/100,FLOOR(REF(实收价,1)*110)/100);

跌停:=实收价 <=IF(FRACPART(REF(实收价,1)* 90)>0.46,CEILING(REF(实收价,1)* 90)/100,FLOOR(REF(实收价,1)* 90)/100);

二十均线:=INTPART(MA(C,20)*100)/100;

站稳状态:=SUM(C>=二十均线,4)=4;

跌破状态:=SUM(C<=二十均线,4)=4;

站稳确立:=CROSS(站稳状态,0.5);

跌破确立:=CROSS(跌破状态,0.5);

上涨浪:=(BARSLAST(站稳确立)<BARSLAST(跌破确立) && BARSLAST(站稳确立)>=0) ||

(BARSLAST(跌破确立)=-1 && BARSLAST(站稳确立)>=0) ||

(BARSLAST(跌破确立)=-1 && BARSLAST(站稳确立)=-1 && C>二十均线);

下跌浪:=(BARSLAST(跌破确立)<BARSLAST(站稳确立) && BARSLAST(跌破确立)>=0) ||

(BARSLAST(站稳确立)=-1 && BARSLAST(跌破确立)>=0) ||

(BARSLAST(跌破确立)=-1 && BARSLAST(站稳确立)=-1 && C<二十均线);

稳:=CROSS(上涨浪,0.5);

破:=CROSS(下跌浪,0.5);

稳日:=BARSLAST(CROSS(上涨浪,0.5));

破日:=BARSLAST(CROSS(下跌浪,0.5));

站稳:=IF(上涨浪,稳日+1,-破日-1);

不破20日:=站稳>0 && 站稳状态=1;

T1:=BARSLAST(稳=1);

T2:=BARSLAST(破=1);

低点点:=IF(T1=0,LLV(L,T2+8),0);

高点点:=IF(T2=0,HHV(H,T1+8),0);

低收点点:=IF(T1=0,LLV(C,T2+8),0);

高收点点:=IF(T2=0,HHV(C,T1+8),0);

低点黄:=IF(T2>T1,REF(SUM(低点点,T1+1),T1+1),SUM(低点点,T1+1));

高点原:=SUM(高点点,T2+1);

低点原:=SUM(低点点,T1+1);

低点:=IF(FRACPART(低点黄*100)*10>4.6,CEILING(低点黄*100)/100,INTPART(低点黄*100)/100);

STICKLINE(CURRBARSCOUNT=13,低点,低点,700,1),COLORYELLOW;

高点:=IF(FRACPART(高点原*100)*10>4.6,CEILING(高点原*100)/100,INTPART(高点原*100)/100);

STICKLINE(CURRBARSCOUNT=13,高点,高点,700,1),COLORYELLOW;

%0.382:=INTPART((低点+(高点-低点)*0.382)*100)/100;

STICKLINE(CURRBARSCOUNT=13,%0.382,%0.382,700,1),COLORGREEN;

%0.618:=INTPART((低点+(高点-低点)*0.61803)*100)/100;

STICKLINE(CURRBARSCOUNT=13,%0.618,%0.618,700,1),COLORMAGENTA;

%1.618:=INTPART((低点+(高点-低点)*1.61803)*100)/100;

STICKLINE(CURRBARSCOUNT=13,%1.618,%1.618,700,1),COLORRED;

TT:=BACKSET(BARSTATUS=2,2);

TTT:=FILTER(TT,3);

DRAWTEXT(TTT,高点,'高点'),COLORYELLOW;

DRAWTEXT(TTT,%0.382,'%0.382'),COLORGREEN;

DRAWTEXT(TTT,%0.618,'%0.618'),COLORMAGENTA;

DRAWTEXT(TTT,低点,'低点'),COLORYELLOW;

DRAWTEXT(TTT,%1.618,'%1.618'),COLORRED;

T1T:=BACKSET(BARSTATUS=2,20);

TT1T:=FILTER(T1T,21);

DRAWNUMBER(TT1T,%1.618,%1.618),COLORRED;

DRAWNUMBER(TT1T,低点*0.015+低点,低点),COLORYELLOW;

DRAWNUMBER(TT1T,%0.618,%0.618),COLORMAGENTA;

DRAWNUMBER(TT1T,%0.382,%0.382),COLORGREEN;

DRAWNUMBER(TT1T,高点,高点),COLORYELLOW;

IF(上涨浪,MA3,DRAWNULL),LINETHICK2,COLORRED;

IF(下跌浪,MA3,DRAWNULL),LINETHICK2,COLORGREEN;

原创文章,作者:TTone,如若转载,请注明出处:https://www.qianglongwang.com/61085.html

联系我们