%> 通达信水平线主图指标公式_股票教程网
通达信水平线主图指标公式 2647

短线白色:=1;

洋红线:=1;

底部线:=1;

红色主升:=1;

{DRAWKLINE(HIGH,OPEN,LOW,CLOSE);{副图添加K线}

{----------低位----最长周期,青色线-------------------};

RSV:=(CLOSE-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100;

K:=SMA(RSV,3,1);

D:=SMA(K,3,1);

TJ:=D<10;

低位:BARSLAST(TJ),COLORLICYAN,NODRAW;

{----------中线区-------洋红色线--------------2--------------};

B2:=(3*CLOSE+LOW+OPEN+HIGH)/6,COLORWHITE,LINETHICK2;

B3:=(21*B2+20*REF(B2,1)+19*REF(B2,2)+18*REF(B2,3)+17*REF(B2,4)+16*REF(B2,5)+

15*REF(B2,6)+14*REF(B2,7)+13*REF(B2,8)+12*REF(B2,9)+11*REF(B2,10)+

10*REF(B2,11)+9*REF( B2,12)+8*REF(B2,13)+7*REF(B2,14)+6*REF(B2,15)+

5*REF(B2,16)+4*REF(B2,17)+3*REF(B2,18)+2*REF(B2,19)+

REF(B2,21))/231,COLORMAGENTA,LINETHICK2;

VAR1:=BARSLAST(B3=LLV(B3,60));

中线:BARSLAST(B3=LLV(B3,60)),COLORMAGENTA,NODRAW; {排序,显示周期数};

{----------有趋势------白色线-------------3---------------};

VARN1:=20;

VARN2:=REF(C,VARN1)=HHV(C,2*VARN1+1);

VARN3:=NOT(VARN2);

VARN5:=BARSLAST(VARN2);

{有趋势:IF((VARN3=1)/短线白色,REF(LOW,VARN5),DRAWNULL),COLORWHITE,LINETHICK2;{3};

白线:BARSLAST(VARN2),COLORWHITE,NODRAW;

{---------主升区:主要选股指标,有1个就可以了-----};

中2:=EMA(CLOSE,50)-EMA(CLOSE,130),COLORBROWN;

DYO:=IF(中2>0,0.3,DRAWNULL);{显示}

主升:BARSLAST(DYO=DRAWNULL),COLORRED,NODRAW;

{-----------------显示3条指标线------------};

AAA:=(3*C+H+L+O)/6;

VAR1F:(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36,COLORWHITE,COLORLIGRAY;

VAR2:(LLV(VAR1F,5)+LLV(VAR1F,10)+LLV(VAR1F,20))/3,COLORGREEN;{绿色线}

VAR6:(LLV(VAR1F,2)+LLV(VAR1F,4)+LLV(VAR1F,6))/3,COLORBLUE;{蓝色线}

{----------显示水平线---------------------------------------------};

低位线:IF((BARSLAST(TJ))/底部线,REF(LOW,BARSLAST(TJ))-0.3,DRAWNULL),COLORLICYAN,COLORYELLOW,COLORLICYAN,LINETHICK3;

中线区:IF((VAR1>0)/洋红线,REF(LOW,VAR1),DRAWNULL),COLORMAGENTA,LINETHICK2;

主升区:IF(主升/红色主升,REF(LOW,主升),DRAWNULL),COLORRED,LINETHICK4;

有趋势:IF((VARN3=1)/短线白色,REF(LOW,VARN5),DRAWNULL),COLORWHITE,LINETHICK2;



 

{股票教程网-http://gwgz.net/承接通达信软件和公式破解,普通加密破解,完全加密破解,导入密码破解,时间限制破解,公式编写,可按您的要求写公式指标,价格按难度不同报价,有需要可以找我们}