出现"买"提示买入,出现"卖"提示卖出;连续出现"买"表示持续看涨,连续出现"卖"表示持续看跌;没有提示则等待,最近一次提示"买"则持仓等待,最近一次提示"卖"则空仓等待。
源码
AVP:=0.25*(H+L+O+C);
DIFF := EMA(CLOSE,12) - EMA(CLOSE,26);
MID: MA(AVP,23);
TOP: MID + 2*STD(AVP,23);
BOT: MID - 2*STD(AVP,23);
L1:EMA(AVP,2);
L2:EMA(AVP,4);
L3:=FORCAST(EMA(AVP,2),10);
W1:=(L1-REF(L1,9));
W2:=MA(w1,2);
DRAWTEXT(L1>L2 AND W1>W2 AND L1>REF(L1,1) AND (TOP>REF(TOP,1) OR BOT>REF(BOT,1)) AND DIFF>REF(DIFF,1) ,BOT*0.98,'买');
DRAWTEXT(L1 DRAWTEXT((REF(CLOSE,1)>REF(TOP,1) OR REF(AVP,1)>REF(TOP,1)*1.02) AND CLOSE