以文本方式查看主题

-  金字塔客服中心 - 专业程序化交易软件提供商  (http://www.weistock.com/bbs/index.asp)
--  公式模型编写问题提交  (http://www.weistock.com/bbs/list.asp?boardid=4)
----  [求助]亏损则平仓  (http://www.weistock.com/bbs/dispbbs.asp?boardid=4&id=137936)

--  作者:宁静致远1
--  发布时间:2016/8/12 15:03:14
--  [求助]亏损则平仓
老师,5分钟周期成交后,5分钟K线收盘亏损则平仓怎么表达
--  作者:jinzhe
--  发布时间:2016/8/12 15:04:35
--  

if openprofit<0 then begin

   sell(1,0,market);

   sellshort(1,0,market);

end

 

用走完k线下单模式


--  作者:宁静致远1
--  发布时间:2016/8/12 15:07:22
--  
我现在用的是提前2秒下单,用的是固定时间模式,可以用吗
--  作者:宁静致远1
--  发布时间:2016/8/12 15:12:02
--  
帮我看一下,我这样表达可以吗

if openprofit<0 or  macd1<0 and holding>0 and abb then sell(1,0,marketr);

--  作者:宁静致远1
--  发布时间:2016/8/12 15:12:53
--  
abb 是提前2秒下单
--  作者:宁静致远1
--  发布时间:2016/8/12 15:15:07
--  
帮我看一下,我这样表达可以吗

if openprofit<0 or  macd1<0 and holding>0 and abb then sell(1,0,marketr);

--  作者:jinzhe
--  发布时间:2016/8/12 15:18:08
--  

可以,用代码实现走完k线提前下单,那么就必须要用固定时间间隔模式了