Rss & SiteMap

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

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

标题:移动止盈改为后台

1楼
cdqwy781 发表于:2018/6/5 22:26:43
maxProfit:ENTERPRICE-llv(l,ENTERBARS);

maxProfit1:HHV(H,ENTERBARS)-ENTERPRICE;

if maxProfit>10*mindiff and  holding<0 and ENTERBARS>0 and  C>MA(C,10) then 止盈b:sellshort(1,holding,market);





if maxProfit1>10*mindiff and  holding>0 and ENTERBARS>0 and C<MA10 then 止盈b1:sell(1,holding,market);
2楼
wenarm 发表于:2018/6/6 8:44:02

maxProfit:tENTERPRICE-llv(l,tENTERBARS);
maxProfit1:HHV(H,tENTERBARS)-tENTERPRICE;
if maxProfit>10*mindiff and  tholding<0 and tENTERBARS>0 and  C>MA(C,10) then 止盈b:tsellshort(1,tholding,market);
if maxProfit1>10*mindiff and  tholding>0 and tENTERBARS>0 and C<MA10 then 止盈b1:tsell(1,tholding,market);

 

最简单的改法就是把图表的交易函数改为后台的。不过还是属于图表的处理思路。对于后台的移动止损,你可以参考系统自带的后台移动止损模块代码

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


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