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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 初次写了个系统 看看有啥问题

   

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


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

主题:初次写了个系统 看看有啥问题

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


加好友 发短信
等级:论坛游侠 帖子:141 积分:0 威望:0 精华:0 注册:2015/11/23 21:44:41
初次写了个系统 看看有啥问题  发帖心情 Post By:2016/5/19 21:50:34    Post IP:124.73.81.130[只看该作者]

variable:positioncount=0;

atr:=ma(tr,20);

day20high:=ref(hhv(high,20),1);
day20low:=ref(llv(low,20),1);
day55high:=ref(hhv(high,55),1);
day55low:=ref(llv(low,55),1);

longcond1:=high>day20high;
shortcond1:low<day20low;

if longcond1 and positioncount=0 then 
begin
ss:=INTPART(asset*0.02/atr/MULTIPLIER);
buy(1,ss,market);
positioncount:=positioncount+1;
end

if high>enterprice+0.5*atr and positioncount<>0 and positioncount<4 then 
begin
ss:=INTPART(asset*0.02/atr/MULTIPLIER);
buy(1,ss,market);
positioncount:=positioncount+1;
end

if low<enterprice-2*atr then 
begin 
sell(1,100%,market);
positioncount:=0;
end

asset100:asset,noaxis;
持仓:holding,linethick0;

依照海龟规则 简单写了个
不知道有啥问题   为什么收益那么差  第一次写  有哪里写的不对呢?

 回到顶部