input:p(26,20,100,8),s(12,5,40,4),m(9,2,60,6);//参数设置 DIFF : EMA(CLOSE,S) - EMA(CLOSE,P);
if macd1<1 and c<ma(c,120) then cond1:ENTERPRICE-c>15*MINDIFF; 止损1:sell(holding>0 and cond1,holding,market); 用这个图标没有开空请老师帮我补充一下,当价格在120日均线之下,MACD小于1开空; |
input:p(26,20,100,8),s(12,5,40,4),m(9,2,60,6);//参数设置
DIFF : EMA(CLOSE,S) - EMA(CLOSE,P);
DEA : EMA(DIFF,M);
MACD1 : 2*(DIFF-DEA), COLORSTICK;
if macd1>1 and c>ma(c,120) then
begin
sellshort(holding<0,holding,market);
buy(holding=0,1,MARKET);
end
if macd1<1 and c<ma(c,120) then
begin
sell(holding>0,holding,MARKET);
buyshort(holding=0,1,market);
end
cond1:ENTERPRICE-c>15*MINDIFF;
cond2:c-ENTERPRICE>50*MINDIFF;
止损1:sell(holding>0 and cond1,holding,market);
止盈1:sell(holding>0 and cond2,holding,market);