 
等级: 超级版主
- 注册:
- 2021-5-18
- 曾用名:
|
本帖最后由 技术008 于 2024-4-26 14:37 编辑
cond1:close>valuewhen(todaybar=1,open);
cond2:close<valuewhen(todaybar=1,open);
DIFF : EMA(CLOSE,12) - EMA(CLOSE,26),NOAXIS;
DEA :EMA(DIFF,9),NOAXIS;
MACD1 : =2*(DIFF-DEA), COLORSTICK,NOAXIS;
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;
ti:(time>0900 and time<1458) or (time>2100 and time<2258);
if cond1 and diff>dea and dea>0 and k>d and ti and dea>0 then
begin
sellshort(1,holding,marketr);
buy(1,1,marketr);
end
if diff<dea and dea>0 then sell(1,holding,marketr);
if cond2 and diff<dea and dea<0 and k<d and ti then
begin
sell(1,holding,marketr);
buyshort(1,1,marketr);
end
if diff>dea and diff<0 then sellshort(1,holding,marketr);
|
|