|
k:"kdj.k",linethick,COLORWHITE;
. g, e& Q& F$ S E% f% Ed:"kdj.d",linethick0,COLORYELLOW;% I9 m$ K5 z5 X# _+ P* g
r1:"rsi.rsi1",linethick0,ColorC080FF;
* Q' _6 y" k7 ~+ ~9 C2 d) u7 kr2:"rsi.rsi2",linethick0,ColorFF8080;7 q6 f$ ]( f1 n- k
r3:"rsi.rsi3",linethick0,Color87F8F4;
; a4 Q9 |' ^! y& e7 ]f:"macd.diff",linethick0,Color72C072;
% ?) \: ]6 G/ m8 o) Wa:"macd.dea",linethick0,ColorE98210;. E" V: a; k: M8 M" B0 h
m:"macd.macd",linethick0,COLORWHITE;) e# w6 R6 M9 t9 Q
{以下界说叠加区间(在这里是可见K线的范围)}* [7 i6 H( F( V6 N9 S
q:=SYSPARAM(3)-SYSPARAM(2);
2 z! i# J) |" yp:=SYSPARAM(3);
! d! L8 m) m# J3 g. ?$ ^ N- j8 P{以下盘算叠加比和叠加平移量}
/ h' O' N5 q) z |; Z+ N& I& Z- i{1、叠加字段高度}$ N$ Y$ ~0 u) |( W: [1 M4 a4 g+ l; F
kh:=hhv(h,q);
' Z. {+ d4 ?( ?3 ]kL:=LLv(L,q);
0 G' ^' T; [: J& r) mdh:=hhv(max(k,d),q);% N! ]; ~. d! J$ R3 h, c
dL:=LLv(min(k,d),q);; z7 w! S) R2 e0 [6 B" s, y
mh:=hhv(max(f,a),q);8 v. T6 m# s( w! d2 l" s
mL:=LLv(max(f,a),q);3 K& D* p8 I- W3 y+ ?" j
rh:=hhv(max(max(r1,r2),r3),q);! |, c0 p) h0 ~( \! A7 a4 ?
rL:=LLv(min(min(r1,r2),r3),q);
1 d4 A& \' H6 D( j* Y" B+ S$ v{2、叠加比}" |. g2 g# }5 w+ c7 W) d% W# i+ `
bd:=(kh-kL)/(dh-dL)/3;+ M& p% K \ F% \/ t- L
bm:=(kh-kL)/(mh-mL)/3;4 X# W( H4 k* n @0 Q
br:=(kh-kL)/(rh-rL)/3;
$ m+ P& _( E" u6 t$ H{3、叠加平移量}/ [$ ~0 {/ C2 v0 p% i5 k# g
wk:=(kh-kL)/3;! c; o. A' f. ?
wd:=(kh+kL-(dh+dL)*bd)/2-wk[p];
: `3 U1 q/ o: R' U- Lwm:=(kh+kL-(mh+mL)*bm)/2;
7 @& D' |* h& i/ [7 zwr:=(kh+kL-(rh+rL)*br)/2+wk[p];$ E" ?/ N9 K+ v$ q( [7 F
{以下画叠加线}: e( h0 N9 [% j
PARTLINE(1,k*bd[p]+wd[p]),COLORWHITE;$ H z6 k% a7 @" f
PARTLINE(1,d*bd[p]+wd[p])COLORYELLOW;
+ C5 N& s3 D/ V- |" y* M6 HPARTLINE(1,r1*br[p]+wr[p]),ColorC080FF;
2 H# }' @% R; |+ I0 S, A' ZPARTLINE(1,r2*br[p]+wr[p]),ColorFF8080;
* [3 E, B- L6 a7 {( iPARTLINE(1,r3*br[p]+wr[p]),Color87F8F4;# w0 B+ ~' t: U% }
PARTLINE(1,f*bm[p]+wm[p]),Color72C072;
6 p; l4 c8 I. S5 c5 m ?5 x6 v: ?( w: uPARTLINE(1,a*bm[p]+wm[p]),ColorE98210;5 S; n& d0 g. |* Q4 ^2 E
STICKLINE(m>0,m*bm[p]+wm[p],wm[p],0.1,0),POINTDOT,COLORMAGENTA;3 h! @9 ?" _- `9 m+ M" ^) ^
STICKLINE(m |