RSS1RSS2 加入收藏
股票 必读教材第一步:新手疑惑第二步:开户买股第三步:必要名词第四步:看盘基础第五步:股市常识第六步:炒股书籍第七步:视频学习终极操盘 知识
您当前的位置:首页 > 股票软件 > 金字塔公式
软件名称: 金字塔Dual Thrust日内策略模型源码集锦 多个版本源码[金字塔模型]
整理时间: 2015-07-11
界面语言: 简体中文
软件类型: 金字塔公式
运行环境: Win9X/Win2000/WinXP/Win2003/Win7/Win8/Win10
授权方式: 共享软件
软件大小: 0 Bytes
软件等级:
软件登陆: admin
作 者 : 58gu.com小编
官方网址: 官方站
程序演示: 演示
软件简介:  
Dual Thrust与R-Breaker一样,曾长期排名Future Trust杂志最赚钱的策略。该策略在形式上和开盘区间突破策略类似。不同点主要体现在两方面:Dual Thrust在Range(代码中的浮动区间)的设置上,引入前N日的四个价位,使得一定时期内的Range相对稳定,可以适用于日间的趋势跟踪;Dual Thrust对于多头和空头的触发条件,考虑了非对称的幅度,做多和做空参考的Range可以选择不同的周期数,也可以通过参数K1和K2来确定。 来源 www.88gs.com  当K1<K2时,多头相对容易被触发,当K1>K2时,空头相对容易被触发。因此,投资者在使用该策略时,一方面可以参考历史数据测试的最优参数,另一方面,则可以根据自己对后势的判断,或从其他大周期的技术指标入手,阶段性地动态调整K1和K2的值。
此主题相关图片如下:dual thrust.jpg
//策略:Dual Thrust//类型:日内//修订时间:2012.11.1
//Designed By Rogarz//中间变量input:n(1,1,100,1),K1(0.7,0.1,1,0.1),k2(0.7,0.1,1,0.1),nmin(10,1,100,1),ss(1,1,100,1);CYC:=barslast(date<>ref(date,1))+1;昨高:=callstock(stklabel,vthigh,6,-1);昨低:=callstock(stklabel,vtlow,6,-1);昨收:=callstock(stklabel,vtclose,6,-1);开盘价:=valuewhen(cyc=1,open);HH:=hhv(昨高,n);//N日high的最高价HC:=hhv(昨收,n);//N日close的最高价LC:=LLV(昨收,n);//N日close的最低价LL:=LLV(昨低,n);//N日low的最低价浮动区间:=max(HH-LL,HC-LL);//range上轨:开盘价+k1*浮动区间;下轨:开盘价-K2*浮动区间;t1:=time>opentime(1) and time<closetime(0)-nmin*100;t2:=time>=closetime(0)-nmin*100;手数:=ss;//交易条件 www.88gs.com开多条件:=c>上轨 and holding=0;开空条件:=c<下轨 and holding=0;//交易系统开多:buy(开多条件 and t1 and cyc>1,手数,market);开空:buyshort(开空条件 and t1 and cyc>1,手数,market);收盘平多:sell(t2,手数,market);收盘平空:sellshort(t2,手数,market);这个策略在论坛中已有很多个版本,这个版本——引入了前N日的四个价位,以及K1、K2参数。默认参数设置与原论坛中的策略一致,为前一日,K1=k2=0.7.////////////////////////=================================================第二种版源码:适合日线以下 任何周期 中间直接调用 日线数据 不过每天要把画面切换到 日线周期 刷新一个昨日的日线数据还有注意费率设置 要改成期货 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);
endif holding<0 then begin
if high>=upperband then begin
sellshort(1,holding,limitr,max(open,upperband));
buy(1,volunit,limitr,max(open,upperband));
end
//www.88gs.com
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;//////////////=================================第三版本源码:input:k(0.7,0.1,1,0.1);dist1:=barslast(day>ref(day,1))+1;
dist2:=ref(dist1,dist1);predayhigh:=ref(hhv(high,dist2),dist1);
predaylow:=ref(llv(low,dist2),dist1);
predayclose:=ref(close,dist1);
predayrange:=max(predayhigh-predayclose,predayclose-predaylow);="Verdana">dayopen:=ref(open,dist1-1);upperband:=dayopen+k*predayrange;
lowerband:=dayopen-k*predayrange;if holding=0 then begin
if high>=upperband then
buy(1,volunit,limitr,max(open,upperband));
endif holding=0 then begin
if low<=lowerband then
buyshort(1,volunit,limitr,min(open,lowerband));
endif holding>0 then begin
if low<=lowerband then begin
sell(1,holding,limitr,min(open,lowerband));
buyshort(1,volunit,limitr,min(open,lowerband));
end
// www.88gs.com
if time>=closetime(0) then
sell(1,holding,limitr,close);
endif 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,noaxis,colorred,linethick2;
下载地址: [ 下载地址1 ]
下载帮助: 发表评论 加入收藏夹 错误报告
相关软件:
  • 小月操盘线 一条能让你赚到钱的线
  • 沉船寻宝副图:无未来函数,有明显的买卖提示。
  • 爆涨前夜选股指标
  • 自用的一个主图公式
  • 庄家逃跑监控指标
  • 通达信 黄色立柱T+0分时指标 及选股 预警公式
  • 通达信起爆位置指标公式
  • 拔地而起!!!祝你股海扬帆!
  • 超准趋势线(源码 副图 通达信 贴图 说明)
  • 通达信抄底指标
  • 下载说明: ⊙推荐使用网际快车下载本站软件,使用 WinRAR v3.10 以上版本解压本站软件。
    ⊙如果这个软件总是不能下载的请点击报告错误,谢谢合作!!
    ⊙下载本站资源,如果服务器暂不能下载请过一段时间重试!
    ⊙如果遇到什么问题,请到本站论坛去咨寻,我们将在那里提供更多 、更好的资源!
    ⊙本站提供的一些商业软件是供学习研究之用,如用于商业用途,请购买正版。
    发表评论 共有条评论
    验证码:
    推荐下载
    最后更新
    热门点击