RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
DIFF:= EMA(CLOSE,12) - EMA(CLOSE,26);
DEA :=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
做多:=IF(K>D AND MACD>0 AND V>1,2,0),COLORRED;
做空:=IF(K<D AND MACD<0 AND V>1,-2,0),COLOR00FF00;
强洗:=IF(MACD>0 AND K<D AND V>1,1,0),COLOR0099FF;
弱升:=IF(MACD<0 AND K>D AND V>1,-1,0),COLORFFFF00;
STICKLINE(做多 AND C>=O,C,O,3,1),COLORRED;
STICKLINE(做多 AND C<O,C,O,3,0),COLOR990099;
STICKLINE(做多 AND C<O,C,O,1,0),COLORCC00CC;
STICKLINE(做多 AND C<O,C,O,0.3,0),COLORFF00FF;
STICKLINE(做多 AND C>=O,C,O,3,1),COLOR0000FF;
STICKLINE(做多 AND C>=O,C,O,1.5,0),COLOR0000DD;
STICKLINE(做多 AND C>=O,C,O,0.4,0),COLOR0000FF;
STICKLINE(做空 AND C>=O,L,H,0.1,0),COLOR0000FF;
STICKLINE(做空 AND C>=O,C,O,3,1),COLOR00FF00;
STICKLINE(做空 AND C<O,C,O,3,0),COLOR00FF00;
STICKLINE(做空 AND C<O,C,O,0.3,0),COLOR00FF00;
STICKLINE(做空 AND C<O,C,O,0.3,0),COLOR00FF00;
STICKLINE(强洗 AND C>=O,L,H,0.1,0),COLOR0000FF;
STICKLINE(强洗 AND C>=O,C,O,3,1),COLORFFFFFF;
STICKLINE(强洗 AND C<O,C,O,3,0),COLOR999999;
STICKLINE(强洗 AND C<O,C,O,1,0),COLORCCCCCC;
STICKLINE(强洗 AND C<O,C,O,0.3,0),COLORFFFFFF;
STICKLINE(弱升 AND C>=O,C,O,3,1),COLOR00FFFF;
STICKLINE(弱升 AND C<O,C,O,3,0),COLOR009999;
STICKLINE(弱升 AND C<O,C,O,0.3,0),COLOR00FFFF;
昨天:=REF(CLOSE,1);
涨停:=IF(((((CLOSE - 昨天) * 100) /昨天 ) >= (10 - ((0.01 * 100) / 昨天))),1,0);
STICKLINE(涨停,H,((CLOSE + OPEN) / 2),2.2,0),COLOR00FFFF;
M5:MA(C,5),COLORWHITE,LINETHICK2;
IF(M5>REF(M5,1),M5,DRAWNULL),COLORRED,LINETHICK2;
IF(M5<REF(M5,1),M5,DRAWNULL),COLORGREEN,LINETHICK2;
RSV1:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;
K11:=SMA(RSV1,5,1);
D11:=SMA(K11,5,1);
J11:=3*K11-2*D11;
AA11:=EMA(J11,5);
AA22:=REF(AA11,1);
RSV2:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K22:=SMA(RSV2,3,1);
D22:=SMA(K22,3,1);
J22:=3*K22-2*D22;
BB11:=EMA(J22,5);
BB22:=REF(BB11,1);
DD:=AA11>AA22 AND BB11>BB22;
注意买入:=DD AND NOT(REF(DD,1)) AND (AA11<50 OR BB11<50);
注意卖出:=REF(DD,1)=1 AND NOT(DD);
DRAWICON(注意买入,L-0.018,9);
DRAWICON(注意卖出,H+0.018,10);
LC:=REF((O+H+L+2*C)/5,1);
RSI:=SMA(MAX(C-LC,0),7,1)/SMA(ABS(C-LC),7,1)*10;
卖:=CROSS(7.1,RSI) AND MA(V,10)>MA(V,5),COLORGREEN;
DRAWTEXT(注意卖出,H+0.020,'■■■落帒为安■■■'),COLORGREEN;
DRAWTEXT(注意买入,M5,'---------------------------------------'),COLORRED;
|