金字塔决策交易系统

标题: 日内平仓时间设置问题 [打印本页]

作者: 大碗    时间: 2021-11-29 15:50
标题: 日内平仓时间设置问题
我代码里面写了一个强平时间,但是还是没有效果,麻烦你帮我看看我哪里没写对

input:开始开单时间(090000,0,235959,10000);
input:停止开单时间(220000,0,235959,10000);
input:平仓时间(235900,0,235959,10000);

时间:=time>=开始开单时间 and time<停止开单时间;
平仓时间1:=time>=平仓时间;

止损:=点差;
止赢:=点差*2;
input:手数(1,0,100,10);
if holding=0 and 开多 then BEGIN
        if 时间 then buy(1,手数,MARKET);//口水
end

if holding=0 and 开空  then BEGIN
        if 时间 then buyshort(1,手数,MARKET);
end

if holding<0 and (开多 or 平仓时间1) and enterbars>0 then sellshort(1,手数,MARKET);
if holding>0 and (开空 or 平仓时间1) and enterbars>0 then sell(1,手数,MARKET);

if holding<0 and (c-ENTERPRICE>=止损 or ENTERPRICE-c>=止赢) and enterbars>0 then sellshort(1,手数,MARKET);
if holding>0 and (c-ENTERPRICE>=止赢 or ENTERPRICE-c>=止损) and enterbars>0 then sell(1,手数,MARKET);


作者: 技术009    时间: 2021-11-29 15:52
你这里时间写的都是北京时间。金字塔里默认是一个金字塔的时区。


https://www.weistock.com/docs/HE ... 4%E6%97%B6%E5%8C%BA

要调整成金字塔时间的格式。







欢迎光临 金字塔决策交易系统 (https://www.weistock.com/bbs/) Powered by Discuz! X3.4