Rss & SiteMap

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

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

标题:请老师帮忙写个移动止损

1楼
fkeeqg 发表于:2016/7/1 14:30:25
多或空开仓后亏2%止损,盈利3%以上后把止损移致成本价。。。盈利超3%以上后回撤未到成本价不止盈(损)。
[此贴子已经被作者于2016-7-1 14:31:38编辑过]
2楼
jinzhe 发表于:2016/7/1 14:47:29

if holding>0 and c<=enterprice*0.98 then sell(1,0,market);

if holding<0 and c>=enterprice*1.02 then sellshort(1,0,market);

 

if holding>0 and hhv(h,enterbars+1)>=enterprice*1.03 and c<enterprice then sell(1,0,market);

if holding<0 and llv(l,enterbars+1)<=enterprice*0.97 and c>enterprice then sellshort(1,0,market);

共2 条记录, 每页显示 10 条, 页签: [1]


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