Rss & SiteMap

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

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

标题:代码编写

1楼
jiangsen 发表于:2012/11/2 23:15:48
这个平仓条件如何写成代码啊?这样就能在图上看出场的箭头指示了
图片点击可在新窗口打开查看此主题相关图片如下:qq截图20121102230843.png
图片点击可在新窗口打开查看
2楼
RogarZ 发表于:2012/11/3 10:17:29
这个就是移动止损止盈
2.93——交易系统——E 图表交易系统模板
3楼
jiangsen 发表于:2012/11/3 11:05:10
maxprofit:=0;
win:=0;
win2:=0;
if holding > 0 and enterbars > 0 then
begin
 win:=(c-enterprice)/enterprice*100; //记录最大盈利
 if win > maxprofit then
  maxprofit:=win; 
  
 win2:=(maxprofit-win)/maxprofit*100; //最大盈利后的回调幅度
end
if holding < 0 and enterbars > 0 then
begin
 win:=(enterprice-c)/enterprice*100; //记录最大盈利
 if win > maxprofit then
  maxprofit:=win;
  
 win2:=(maxprofit-win)/maxprofit*100; //最大盈利后的回调幅度
end
//出现浮动亏损比如2%平仓
止损:SELL(win < -2,0);
 
//出现最高盈利后,回落到盈利的60%平仓出场
止赢:SELL(win2 >= 60 and openprofit > 0, 0);


我把这段话加在我系统的最后可是评测结果一点变化也没有啊
4楼
RogarZ 发表于:2012/11/4 12:23:00

自己理解后用。

具体策略、具体情况、具体分析。

学习中有问题可以来提问。

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


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