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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 请老师编制一个移动止损的范例学习,谢谢!

   

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


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

主题:请老师编制一个移动止损的范例学习,谢谢!

帅哥哟,离线,有人找我吗?
rushtaotao
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信 czt
等级:蜘蛛侠 帖子:1445 积分:6114 威望:0 精华:3 注册:2012/1/16 10:31:19
  发帖心情 Post By:2012/4/17 8:50:45    Post IP:58.246.57.26[显示全部帖子]

//2楼给出的是后台程序化交易,无法满足您的图标交易要求,给出个移动止盈的例子,道理是一样的,供参考


kkcon:=0;
//(1)触发条件,开空1手
if KKcon THEN buyshort(1,1,market);

//(2)开仓后不利>=3个指数点止损
if l > enterprice + 3 then sellshort(1,0,market);

//(3)止赢1:赢利>=8个指数点后回撤>=5个指数点,止赢
if holding<0 and c<=enterprice - 8 then
   begin
        maxpro:=c;
        if c >= maxpro -5 then sellshort(1,0,market);
   end

//(4)止赢2:赢利>=15个指数点后回撤>=3个指数点,止赢
if holding<0 and c<=enterprice - 15 then
   begin
        maxpro:=c;
        if c >= maxpro - 3 then sellshort(1,0,market);
   end

//(5)止赢3:赢利>=20个指数点后回撤>=2个指数点,止赢
if holding<0 and c<=enterprice - 20 then
   begin
        maxpro:=c;
        if c >= maxpro - 2 then sellshort(1,0,market);
   end

//(6)止赢3:赢利>=25个指数点,止赢
if holding<0 and c<=enterprice - 25 then sellshort(1,0,market);

//平所有仓
if time>=145900 then
begin
     sellshort(1,0,market);
     sell(1,0,market);
end


 回到顶部