以下是同花顺神仙趋势+分割线公式

同花顺神仙趋势+分割线公式

源码

 

 H1:EMA(CLOSE,6);

H2:EMA(H1,18);

H3:EMA(CLOSE,108),coloryellow;

STICKLINE(H1>H2,H1,H2,6,0),color8E236B;

STICKLINE(H1<H2,H1,H2,6,0),color545454;

DRAWKLINE(H,O,L,C);

rd:=CROSS(CURRBARSCOUNT<N+1,0.5);

et:=BARSLAST(rd);

IF et>=0 THEN BEGIN

rt:=et;

HH:=REF(H,BARSLAST(HHV(H,rt)=H));

LL:=REF(L,BARSLAST(LLV(L,rt)=L));

VERLINE(rd,2),COLOR00ffff;

END;

//————————————————–

kk:=(HH-LL);

HH1:=LL+KK*0.191;

HH2:=LL+KK*0.382;

HH3:=LL+KK*0.5;

HH4:=LL+KK*0.618;

HH5:=LL+KK*0.809;

//—————————————————————-

tt:=BARSCOUNT(et);

x1:BACKSET(HH,tt),DOTLINE,COLORFFffFF;

x2:BACKSET(HH1,tt),DOTLINE,colorgreen;

x3:BACKSET(HH2,tt),DOTLINE,colorgreen;

x4:BACKSET(HH3,tt),DOTLINE,coloryellow;

x5:BACKSET(HH4,tt),DOTLINE,colorred;

x6:BACKSET(HH5,tt),DOTLINE,colorred;

x7:BACKSET(LL,tt),DOTLINE,COLORFFffFF;

DRAWTEXT(ISNULL(REFX(&CLOSE,1)),HH,’“`’+TOSTRING(HH,2)),COLORFFffFF;

DRAWTEXT(ISNULL(REFX(&CLOSE,1)),HH1,’“`’+TOSTRING(HH1,2)),COLORFFffFF;

DRAWTEXT(ISNULL(REFX(&CLOSE,1)),HH2,’“`’+TOSTRING(HH2,2)),COLORFFffFF;

DRAWTEXT(ISNULL(REFX(&CLOSE,1)),HH3,’“`’+TOSTRING(HH3,2)),COLORFFffFF;

DRAWTEXT(ISNULL(REFX(&CLOSE,1)),HH4,’“`’+TOSTRING(HH4,2)),COLORFFffFF;

DRAWTEXT(ISNULL(REFX(&CLOSE,1)),HH5,’“`’+TOSTRING(HH5,2)),COLORFFffFF;

DRAWTEXT(ISNULL(REFX(&CLOSE,1)),LL,’“`’+TOSTRING(LL,2)),COLORFFffFF;

//——————————————————————————

STICKLINE(CLOSE>0 ,CLOSE,OPEN,10,0),color000000;

STICKLINE(OPEN>CLOSE ,CLOSE ,OPEN,9,0 ),COLOR999900;

STICKLINE(OPEN>CLOSE ,CLOSE ,OPEN,8,0 ),COLORbbbb00;

STICKLINE(OPEN>CLOSE ,CLOSE ,OPEN,6,0 ),COLORcccc00;

STICKLINE(OPEN>CLOSE ,CLOSE ,OPEN,4,0 ),COLORdddd00;

STICKLINE(OPEN>CLOSE ,CLOSE ,OPEN,2,0 ),COLOReeee00;

STICKLINE(OPEN>CLOSE ,HIGH,LOW,2,0 ),COLORffff00;

STICKLINE(CLOSE>=OPEN ,CLOSE,OPEN,9,0) ,COLOR000099;

STICKLINE(CLOSE>=OPEN ,CLOSE,OPEN,8,0) ,COLOR0000bb;

STICKLINE(CLOSE>=OPEN ,CLOSE,OPEN,6,0) ,COLOR0000cc;

STICKLINE(CLOSE>=OPEN ,CLOSE,OPEN,4,0) ,COLOR0000dd;

STICKLINE(CLOSE>=OPEN ,CLOSE,OPEN,2,0) ,COLOR0000ee;

STICKLINE(CLOSE>=OPEN ,HIGH,LOW,2,0 ),COLOR000fFF;

 

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。