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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 图表改后台

   

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


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

主题:图表改后台

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


加好友 发短信
等级:黑侠 帖子:611 积分:0 威望:0 精华:0 注册:2015/9/11 9:51:55
图表改后台  发帖心情 Post By:2016/3/25 8:57:56    Post IP:222.70.168.179[只看该作者]

请问下述图表,可以改后台吗?

 

variable:sumwealth=0;

variable:zichan=0;
ma10:=ma(c,5);
ma25:=ma(c,25);
sxf:=0.21/100;//手续费0.21%

手数:=max(0,floor((zichan-ref(zichan,barslast(date=1160315)))/360000));
if holding>0 and ma10<ma25 then begin
 sell(1,holding,thisclose);
 sumwealth:=sumwealth+holding*c*300*(1-sxf);//卖出时减去交易额
end
if holding<0 and ma10>ma25 then begin
 sellshort(1,holding,thisclose);
 sumwealth:=sumwealth-holding*c*300*(1+sxf);//买入时加上交易额
end
if holding=0 and ma10>ma25 and 手数>0 then begin
 buy(1,手数,thisclose);
 sumwealth:=sumwealth-手数*c*300*(1+sxf);
end
if holding=0 and ma10<ma25 and 手数>0 then begin
 buyshort(1,手数,thisclose);
 sumwealth:=sumwealth+手数*c*300*(1-sxf);
end

zichan:=sumwealth+holding*c*300-abs(holding)*c*300*sxf;


 回到顶部