k:"kdj.k",linethick,COLORWHITE;
* Q7 s0 m! V9 y2 [' j' |d:"kdj.d",linethick0,COLORYELLOW;
' Y, T/ v/ K o! B4 f* Kr1:"rsi.rsi1",linethick0,ColorC080FF;
2 `2 o+ _6 n) ^2 i# V% u( Ur2:"rsi.rsi2",linethick0,ColorFF8080;# o s6 X; R& [, z+ s
r3:"rsi.rsi3",linethick0,Color87F8F4;( H- Z6 z6 b7 x4 j
f:"macd.diff",linethick0,Color72C072;
! {( s$ k3 |0 p0 R& `. s% pa:"macd.dea",linethick0,ColorE98210;
0 i/ v; F" |% a$ Vm:"macd.macd",linethick0,COLORWHITE;
- T3 B; v; H$ N{以下界说叠加区间(在这里是可见K线的范围)}
9 e3 M* D, i' U M; }q:=SYSPARAM(3)-SYSPARAM(2);
% m8 O! f% O$ D/ ~p:=SYSPARAM(3);
1 ?1 z5 b1 v6 z" U! N2 w$ i{以下盘算叠加比和叠加平移量}
$ ? m7 _0 B! \ C{1、叠加字段高度}
6 z. K0 [& f% J# F3 n( h& Wkh:=hhv(h,q);
( ~4 R& P/ L4 j; L% H/ e- akL:=LLv(L,q);: o! I4 A8 `( j5 y1 |3 y
dh:=hhv(max(k,d),q);6 J K8 D( a; _; S) t, l
dL:=LLv(min(k,d),q);0 C/ d# Q, J: _
mh:=hhv(max(f,a),q);
5 a# d3 d% R: M9 w' J% WmL:=LLv(max(f,a),q);
$ q# \" {1 ] z* Prh:=hhv(max(max(r1,r2),r3),q);) M' s1 x& d0 _9 T* O
rL:=LLv(min(min(r1,r2),r3),q);+ w. C4 A9 Z x5 B8 x
{2、叠加比}% y% C' o/ [& a* t* X
bd:=(kh-kL)/(dh-dL)/3;$ m) `' Z1 m, D
bm:=(kh-kL)/(mh-mL)/3;* d4 q7 ]* J8 L/ ?
br:=(kh-kL)/(rh-rL)/3;
- T7 q; s* @* i{3、叠加平移量}0 s6 u. B0 Y: s1 H4 k/ [
wk:=(kh-kL)/3;
. E) }! z$ W( Q4 P) iwd:=(kh+kL-(dh+dL)*bd)/2-wk[p];
- c3 w( d8 N9 V: c' Nwm:=(kh+kL-(mh+mL)*bm)/2;
& Z) [- i/ O8 E' H$ m1 i9 pwr:=(kh+kL-(rh+rL)*br)/2+wk[p];6 |7 l3 o: [. G: d, ^
{以下画叠加线}3 \- J- j6 U" }# s5 N; g* ^# d
PARTLINE(1,k*bd[p]+wd[p]),COLORWHITE;
/ F% y' e) D" y4 sPARTLINE(1,d*bd[p]+wd[p])COLORYELLOW;) h' F6 L' b# c- f
PARTLINE(1,r1*br[p]+wr[p]),ColorC080FF;3 }) g/ m' I0 `6 p; T" ]
PARTLINE(1,r2*br[p]+wr[p]),ColorFF8080;& u& E9 c, y' ^, j& M; P
PARTLINE(1,r3*br[p]+wr[p]),Color87F8F4;
, W1 k' O' F7 E0 fPARTLINE(1,f*bm[p]+wm[p]),Color72C072;3 Q/ C0 z9 V: l9 c ^4 c9 M( t
PARTLINE(1,a*bm[p]+wm[p]),ColorE98210; k. H' d/ [" {( x5 v: F
STICKLINE(m>0,m*bm[p]+wm[p],wm[p],0.1,0),POINTDOT,COLORMAGENTA;
3 W# |: Y2 P4 z. Q: qSTICKLINE(m |