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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件交易策略发布专区 → Dual Thrust金字塔修改版

   

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


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

主题:Dual Thrust金字塔修改版

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


加好友 发短信
等级:新手上路 帖子:22 积分:52 威望:0 精华:0 注册:2012/4/20 19:04:53
Dual Thrust金字塔修改版  发帖心情 Post By:2012/8/25 0:37:16 [只看该作者]

适合日线以下 任何周期 中间直接调用 日线数据 不过每天要把画面切换到 日线周期 刷新一个昨日的日线数据

还有注意费率设置 要改成期货 15% 合约单位 按该品种自己调整 手续费自己调整

input:k(0.7,0.1,1,0.1);
predayhigh:=callstock(stklabel,vthigh,6,-1);//昨日最高价
predaylow:=callstock(stklabel,vtlow,6,-1);//昨日最低价
predayclose:=callstock(stklabel,vtclose,6,-1);//昨日收盘价
predayrange:=max(predayhigh-predayclose,predayclose-predaylow);//取大波动值
dayopen:=callstock(stklabel,vtopen,6,0);//今天开盘价
upperband:intpart(dayopen+k*predayrange),colorred;//区间上沿
lowerband:intpart(dayopen-k*predayrange),colorgreen;//区间下沿

下日波动:max(callstock(stklabel,vthigh,6,0)-callstock(stklabel,vtclose,6,0),callstock(stklabel,vtclose,6,0)-callstock(stklabel,vtlow,6,0))*0.7;
if holding=0 then begin
 if high>=upperband then
  buy(1,volunit,limitr,max(open,upperband));
end
if holding=0 then begin
 if low<=lowerband then
  buyshort(1,volunit,limitr,min(open,lowerband));
end
if holding>0 then begin
 if low<=lowerband then begin
  sell(1,holding,limitr,min(open,lowerband));
  buyshort(1,volunit,limitr,min(open,lowerband));
 end
 
if time>=closetime(0) then
  sell(1,holding,limitr,close);
end

if holding<0 then begin
 if high>=upperband then begin
  sellshort(1,holding,limitr,max(open,upperband));
  buy(1,volunit,limitr,max(open,upperband));
 end
 
 if time>=closetime(0) then
  sellshort(1,holding,limitr,close);
end


资产:ASSET,PRECISION0,NOAXIS,COLORFF00FF;
goodin:=(1-(asset/hhv(asset,5520)))*100;
资产回撤百分比:goodin;
资产实际亏损:hhv(asset,5520)-asset,COLORgreen;


 回到顶部