Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共5 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:模型止损止盈用不了

1楼
17878758708 发表于:2017/4/21 14:18:42
OO:VALUEWHEN(DATE<>REF(DATE,1),O);//表示今日第一根K线的开盘价
if C=OO+2 and (TIME>=090000 and TIME<145500) and holding=0 then buy(1,1,marketr);//开多
if C=OO-1 and (TIME>=090000 and TIME<145500) and holding=0 then buyshort(1,1,marketr);//开空
if C=enterprice-8 or C=enterprice+4 then sell(holding>0,holding,marketr) ;//多头止盈止损
if C=enterprice+8 or C=enterprice-4 then  sellshort(holding<0,holding,marketr);//空头止盈止损
if (TIME>=145900 and TIME<200000) or (TIME>=225500) then begin //收盘前全平
sell(holding>0,holding,marketr);
sellshort(holding<0,holding,marketr);
end
 测试
图片点击可在新窗口打开查看此主题相关图片如下:1.png
图片点击可在新窗口打开查看
止损止盈用不了,没有止损止盈是那里代码错误了
2楼
qq代人发帖 发表于:2017/4/21 14:55:56

正在调试,稍等

3楼
qq代人发帖 发表于:2017/4/21 15:05:32

起作用了,止盈止损和收盘平仓动作一样是平仓,所以直接从字面上看一样是平仓。

除了收盘前的平仓其他都是止盈止损的平仓

4楼
17878758708 发表于:2017/4/24 15:43:58
是限价指令一个点不差吗?
5楼
wenarm 发表于:2017/4/25 8:33:28
限价指令,是优于限定价格成交的
共5 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.12500 s, 3 queries.