我是低手。随手练习写了。看看行不。 请高手指正。
If holding>0 and enterprice-close=100*Mindiff then begin
多止损:sell(1, holding, market); //测试就写: sell(1,holding, stop, enterpice-100*Mindiff);
end
//固定轮询 . 100*Mindiff 铜和胶的500点,
可以的。用固定轮询模式
K线走完开仓的条件过去化一下。如:
variable:zs=0;
ma5:=ma(c,5);
ma10:=ma(c,10);
if holding>0 and l<zs then sell(1,1,limitr,min(o,zs-0.2)-0.6);
if holding>0 and ref(ma5<ma10,1) then sell(1,1,limitr,o);
if holding=0 and ref(ma5>m10,1) then begin
buy(1,1,limitr,o);
zs:=o-o*0.001;
end