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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件策略编写求助区 → 请帮看看,这能写一策略吗?

   

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


  共有4625人关注过本帖平板打印复制链接

主题:请帮看看,这能写一策略吗?

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


加好友 发短信 czt
等级:蜘蛛侠 帖子:1445 积分:6114 威望:0 精华:3 注册:2012/1/16 10:31:19
  发帖心情 Post By:2012/3/23 10:23:30 [只看该作者]

仅供参考

 

//(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


 回到顶部