 
等级: 超级版主
- 注册:
- 2021-5-18
- 曾用名:
|
c1:stkindi('','A.ma1',0,4,0);
DIFF : EMA(CLOSE,12) - EMA(CLOSE,26),NOAXIS;
DEA : EMA(DIFF,9),NOAXIS;
MACD1 : 2*(DIFF-DEA),COLORSTICK;
if c1 and cross(macd1,0) then
begin
sellshort(1,holding,marketr);
buy(holding=0,1,marketr);
end
if not(c1) and cross(0,macd1) then
begin
sell(1,holding,marketr);
buyshort(holding=0,1,marketr);
END
if close<hhv(close,enterbars)-30*mindiff and holding>0 then sell(1,holding,marketr);
if close>llv(close,enterbars)+30*mindiff and holding<0 then sellshort(1,holding,marketr); |
|