欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件交易策略发布专区 → 交易系统中移动止损得范例

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有16678人关注过本帖树形打印复制链接

主题:交易系统中移动止损得范例

美女呀,离线,留言给我吧!
xian_0_9
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信 BOO
等级:论坛游民 帖子:378 积分:1856 威望:0 精华:0 注册:2010/1/25 18:04:12
  发帖心情 Post By:2010/8/14 16:04:13 [显示全部帖子]

这个系统一旦触发止损就会反向开仓。买卖信号太频繁了。

我想把这个改成开盘价和收盘价全都超过止损线再反向出信号怎么改?

下面是我自己改的。但是是收盘价过去了,就会出反向的止损。

if barpos = 0 then
  stopprice := l - stopnum;

if aspect = 0 then
begin
 //多头处理  
 if o and c <= stopprice then
 begin
  //多反空
  aspect:= 1;
  stopprice := h+stopnum;
 end
 
 //处理移动的底部
 if l - stopnum > stopprice then
  stopprice := l-stopnum;
end

if aspect = 1 then
begin
 //空头处理  
 if o and c >= stopprice then
 begin
  //空反多
  aspect:= 0;
  stopprice := l-stopnum;
 end
 
 //处理移动的底部
 if h + stopnum < stopprice then
  stopprice := h+stopnum;


 回到顶部