Rss & SiteMap

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

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

标题:平仓公式

1楼
赤焱 发表于:2016/9/1 11:20:22
请问固定止盈、固定止损、开仓后固定周期平仓的公式表达式怎么写?
2楼
jinzhe 发表于:2016/9/1 11:27:39

固定止损:

 

if holding>0 and c<enterprice-5 then sell(1,0,market);

if holding<0 and c>enterprice+5 then sellshort(1,0,market);

 

固定止盈:

if holding>0 and c>enterprice+5 then sell(1,0,market);

if holding<0 and c<enterprice-5 then sellshort(1,0,market);

 

开仓后固定周期:

if enterbars=5 then begin

   sell(1,0,market);

   sellshort(1,0,market);

end

3楼
赤焱 发表于:2016/9/1 11:35:29
谢谢
共3 条记录, 每页显示 10 条, 页签: [1]


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