文华wh6均线交易策略多空波段止盈止损提示主图指标公式源码:
EMA120:=EMA(C,120);
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
DRAWTEXT(C>EMA120&&J<0,L,'多'),VALIGN0;
DRAWTEXT(C<EMA120&&J>100,H,'空'),VALIGN2;
MA(C,30),RGB(128,0,255),NOTEXT;
EMA(C,60),RGB(0,255,64),NOTEXT;
DD:=C>EMA120&&J<0;
KK:=C<EMA120&&J>100;
DRAWSL(DD,L-20*MINPRICE,0,2,0,COLORGREEN),DOT;
DRAWSL(DD,L-20*MINPRICE,0,-2,0,COLORGREEN),DOT;
DRAWTEXT(DD,L-20*MINPRICE,'止损价'),COLORWHITE,VALIGN2;
DRAWNUMBER(DD,L-20*MINPRICE,L-20*MINPRICE,0,COLORWHITE),VALIGN0;
DRAWSL(DD,L+50*MINPRICE,0,2,0,COLORRED),DOT;
DRAWSL(DD,L+50*MINPRICE,0,-2,0,COLORRED),DOT;
DRAWTEXT(DD,L+50*MINPRICE,'止盈价'),COLORWHITE,VALIGN0;
DRAWNUMBER(DD,L+50*MINPRICE,L+50*MINPRICE,0,COLORWHITE),VALIGN2;
DRAWSL(KK,H+20*MINPRICE,0,2,0,COLORGREEN),DOT;
DRAWSL(KK,H+20*MINPRICE,0,-2,0,COLORGREEN),DOT;
DRAWTEXT(KK,H+20*MINPRICE,'止损价'),COLORWHITE,VALIGN0;
DRAWNUMBER(KK,H+20*MINPRICE,H+20*MINPRICE,0,COLORWHITE),VALIGN2;
DRAWSL(KK,H-50*MINPRICE,0,2,0,COLORRED),DOT;
DRAWSL(KK,H-50*MINPRICE,0,-2,0,COLORRED),DOT;
DRAWTEXT(KK,H-50*MINPRICE,'止盈价'),COLORWHITE,VALIGN2;
DRAWNUMBER(KK,H-50*MINPRICE,H-50*MINPRICE,0,COLORWHITE),VALIGN0;