想在1分钟框架上获得3分钟框架上的买入价格。按招您的指导设置以下两个框架, 但是框架2目前没有信号,请帮忙看看。 谢谢
框架1 (EMA) runmode:0;
INPUT:b1(20,5,100,1),b2(150,10,800,1);
ma1:ema(close,b1); ma2:ema(close,b2);
long:= cross(ma1,ma2); slong:= cross(ma2,ma1);
if holding=0 then begin if long then begin 多1:buy(1,1,limitr,close); jg:ENTERPRICE; end end
if holding>0 then begin if slong then begin 平多1:sell(1,holding,limitr,close); end end
框架2(EMA1) runmode:0; jg1:=stkindi(STKLABEL,'EMA.jg',0,17);
long1:=cross(c,jg1+10); slong1:=cross(jg1+20,c) or cross(jg1-10,c) ;
if holding=0 then begin if long1 then begin 多1:buy(1,1,limitr,close); end end
if holding>0 then begin if slong1 then begin 平多1:sell(1,holding,limitr,close); end end
|