同花顺神仙趋势+分割线公式
源码
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;