源码
N:=3;M:=30;
STICKLINE(open>=close ,close ,open,9,0 ),COLORaaaaaa;
STICKLINE(open>=close ,close ,open,6,0 ),COLORbbbbbb;
STICKLINE(open>=close ,close ,open,2.4,0 ),COLORcccccc;
STICKLINE(open>=close ,close ,open,1.1,0 ),COLORdddddd;
STICKLINE(close>open,close,open,9,0 ),COLOr6666cc;
STICKLINE(close>open,close,open,6 ,0 ),COLOR7777dd;
STICKLINE(close>open,close,open,2.4 ,0 ),COLOR8888ee;
STICKLINE(close>open,close,open,1.1 ,0 ),COLOR9999ff;
STICKLINE(close>open,open,low,0.5,0 ),COLOR1199ff;
STICKLINE(close>open,close,HIGH,0.5 ,0 ),COLOR1199ff;
STICKLINE(open>=close,close,low,0.5 ,0 ),COLORcccccc;
STICKLINE(open>=close,open,HIGH,0.5 ,0 ),COLORcccccc;
b:=100*PWINNER(3,close);
a:=hhv(b,5);
ab:=COST(a);
浮动成本:ma(ab,n),colorwhite;
d:=100*PPART(m);
e:=HHv(d,5);
锁定成本:cost(e),COLORYELLOW;
aa:=hhv(h,50000);{上市以来的最高价对应的筹码的价位}
bb:=llv(l,250);{250天以来的最低价对应的筹码的价位}
ss:=aa-bb;{最高筹码与最低筹码之间的价差}
STICKLINE(c>0,ss*0.191+bb,ss*0.191+bb,10,0),COLORBLUE;
{以下几句是分别对应的黄金分割位置对应价位}
STICKLINE(c>0,ss*0.382+bb,ss*0.382+bb,10,0),COLORffff66;
STICKLINE(c>0,ss*0.5+bb,ss*0.5+bb,10,0),colorMAGENTA;
STICKLINE(c>0,ss*0.618+bb,ss*0.618+bb,10,0),colorgreen;
STICKLINE(c>0,ss*0.809+bb,ss*0.809+bb,10,0),colorff9900;
STICKLINE(c>0,bb,bb,10,0),colorred;
DRAWTEXT(c>0 and ISLASTBAR=1,ss*0.191+bb,'19.1%'),COLORYELLOW;
DRAWTEXT(c>0 and ISLASTBAR=1,ss*0.382+bb,'38.2%'),COLORYELLOW;
DRAWTEXT(c>0 and ISLASTBAR=1,ss*0.618+bb,'61.8%'),COLORYELLOW;
DRAWTEXT(c>0 and ISLASTBAR=1,ss*0.5+bb,'50%'),COLORYELLOW;
DRAWTEXT(c>0 and ISLASTBAR=1,ss*0.809+bb,'80.9%'),COLORYELLOW;
DRAWTEXT(c>0 and ISLASTBAR=1,bb,'0'),COLORYELLOW;