以下是通达信压力支撑分界线公式
通达信压力支撑分界线公式
源码
MA5:MA(C,1);
MA10:MA(C,5);
MA20:MA(C,10);
低:=REF(LLV(L,377),3);
高:=REF(LLV(L,377),3)*2;
H191:=(高-低)*0.191+低;
H382:=(高-低)*0.382+低;
H50:=(高-低)*0.5+低;
H618:=(高-低)*0.618+低;
H809:=(高-低)*0.809+低;
H1618:=(高-低)*1.618+低;
低点:REFDATE(低,DATE),COLORWHITE;
%19.1:REFDATE(H191,DATE),COLORGRAY;
%38.2:REFDATE(H382,DATE),COLORCYAN;
%50:REFDATE(H50,DATE),COLORRED;
%61.8:REFDATE(H618,DATE),COLORMAGENTA;
%80.9:REFDATE(H809,DATE),COLORYELLOW;
顶点:REFDATE(高,DATE),COLORBLUE;
%161.8:REFDATE(H1618,DATE),COLOR00FF00;
DRAWTEXT(ISLASTBAR,%161.8,'161.8%'),COLOR00FF00;
DRAWTEXT(ISLASTBAR,顶点,'顶点'),COLORBLUE;
DRAWTEXT(ISLASTBAR,%19.1,'19.1%'),COLORGRAY;
DRAWTEXT(ISLASTBAR,%38.2,'38.2%'),COLORCYAN;
DRAWTEXT(ISLASTBAR,%50,'50%'),COLORRED;
DRAWTEXT(ISLASTBAR,%61.8,'61.8%'),COLORMAGENTA;
DRAWTEXT(ISLASTBAR,%80.9,'80.9%'),COLORYELLOW;
DRAWTEXT(ISLASTBAR,低点,'低点'),COLORWHITE;