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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 老师来看看,对不对

   

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


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

主题:老师来看看,对不对

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


加好友 发短信
等级:论坛游侠 帖子:129 积分:559 威望:0 精华:0 注册:2012/8/28 13:09:08
老师来看看,对不对  发帖心情 Post By:2012/8/30 10:03:47    Post IP:119.6.126.122[只看该作者]

if maxseqloss<2 then begin
  if cound1 then begin
    if holding=-1 then sellshort(1,1,limitr,min(ll+20,enterprice+15));
    if holding=0 then buy(1,1,limitr,min(ll+20,enterprice+15));
  end
  if cound2 then begin
    if holding=1 then sell(1,1,limitr,max(hh-20,enterprice-15));
    if holding=0 then buyshort(1,1,limitr,max(hh-20,enterprice-15));
  end
end
if maxseqloss=2 then begin
  if cound2 and (hh-20)>=enterprice then begin
    if holding=1 then sell(1,1,limitr,hh-20);
    if holding=0 then buy(1,1,limitr,hh-20);
  end
  if cound1 and (ll+20)<=enterprice then begin
    if holding=-1 then sell(1,1,limitr,ll+20);
    if holding=0 then buyshort(1,1,limitr,ll+20);
  end
  if cound2 and (hh-20)<enterprice then begin
    if holding=1 then sell(1,1,limitr,max(hh-20,enterprice-15));
maxseqloss=maxseqloss-3;
  end
  if cound1 and ll+20>enterprice then begin
    if holding=-1 then sellshort(1,1,limitr,min(ll+20,enterprice+15));
  end
maxseqloss=maxseqloss-3;
end

 

意思是连续亏损三次就出场等待新的信号!上面有错吗??没有开仓信号啊!


 回到顶部
帅哥哟,离线,有人找我吗?
漫步金字塔
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:论坛游侠 帖子:129 积分:559 威望:0 精华:0 注册:2012/8/28 13:09:08
  发帖心情 Post By:2012/8/30 10:26:50    Post IP:119.6.126.122[只看该作者]

老师在吗?解答一下,在线等。谢谢老师了!!!!!

老师在吗?解答一下,在线等。谢谢老师了!!!!!


 回到顶部
帅哥哟,离线,有人找我吗?
jinzhe
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:罗宾汉 帖子:46311 积分:50819 威望:0 精华:2 注册:2011/3/23 8:50:25
  发帖心情 Post By:2012/8/31 9:07:06    Post IP:58.246.57.26[只看该作者]

你把最外面的连亏<2写进下单公式里面,不要作为一个全局的条件



金字塔—专业程序化交易量化投资平台

客户服务部

----------------------------------------------------------- 欢迎您参加我公司的技术培训,具体培训需求请发邮件到service@weistock.com

您的宝贵建议或者投诉,请发往邮箱:weiwei@weistock.com

 回到顶部