龙听期货论坛's Archiver

C
+
+


 微信: QQ:

龙听 发表于 2017-10-30 21:12

[转载]【日内策略】Dual Thrust——金字塔平台

[color=#9baaa8][font=Verdana, 宋体, sans-serif][size=12px][p=30, 2, left][font=微软雅黑]策略:Dual Thrust[/font][/p][p=30, 2, left][font=微软雅黑]类型:日内[/font][/p]
[p=30, 2, left][font=微软雅黑]Dual Thrust与[/font][font=微软雅黑]R-Breaker[/font][font=微软雅黑]一样,[/font][font=微软雅黑]曾长期排名[/font][font=微软雅黑][b]Future Trust[/b]杂志最赚钱的策略。该策略[/font][font=微软雅黑]在形式上和开盘区间突破策略类似。不同点主要体现在两方面:Dual Thrust在Range(代码中的浮动区间)的设置上,引入前N日的四个价位,使得一定时期内的Range相对稳定,可以适用于日间的趋势跟踪;Dual Thrust对于多头和空头的触发条件,考虑了非对称的幅度,做多和做空参考的Range可以选择不同的周期数,也可以通过参数K1和K2来确定。
[/font][/p][p=30, 2, left][font=微软雅黑]  当K1时,多头相对容易被触发,当K1>K2时,空头相对容易被触发。因此,投资者在使用该策略时,一方面可以参考历史数据测试的最优参数,另一方面,则可以根据自己对后势的判断,或从其他大周期的技术指标入手,阶段性地动态调整K1和K2的值。[/font][/p][p=30, 2, left][url=http://photo.blog.sina.com.cn/showpic.html#blogid=548c0f960101gp8d&url=http://s1.sinaimg.cn/orignal/58c301b5gcd83ef4bc520][img=0,289]http://s1.sinaimg.cn/mw690/58c301b5gcd83ef4bc520&690[/img][/url]


[/p][/size][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]//策略:Dual Thrust[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]//类型:日内[/font][/font][/color]
[color=#9baaa8][font=Verdana]
[/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]//中间变量[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]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);[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]CYC:=barslast(date<>ref(date,1))+1;[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]昨高:=callstock(stklabel,vthigh,6,-1);[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]昨低:=callstock(stklabel,vtlow,6,-1);[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]昨收:=callstock(stklabel,vtclose,6,-1);[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]开盘价:=valuewhen(cyc=1,open);[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]HH:=hhv(昨高,n);//N日high的最高价[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]HC:=hhv(昨收,n);//N日close的最高价[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]LC:=LLV(昨收,n);//N日close的最低价[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]LL:=LLV(昨低,n);//N日low的最低价[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]浮动区间:=max(HH-LL,HC-LL);//range [/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]上轨:开盘价+k1*浮动区间;[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]下轨:开盘价-K2*浮动区间;[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]t1:=time>opentime(1) and time[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]t2:=time>=closetime(0)-nmin*100;[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]手数:=ss;[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]//交易条件[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]开多条件:=c>上轨 and holding=0;[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]开空条件:=c<下轨 and holding=0;[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]//交易系统[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]开多:buy(开多条件 and t1 and cyc>1,手数,market);[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]开空:buyshort(开空条件 and t1 and cyc>1,手数,market);[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]收盘平多:sell(t2,手数,market);[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]收盘平空:sellshort(t2,手数,market);[/font][/font][/color]
[color=#9baaa8][font=Verdana]
[/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]这个策略已有很多个版本,这个版本——[/font][font=微软雅黑]引入了前[/font][font=微软雅黑]N[/font][font=微软雅黑]日的四个价位,以及K1、K2参数。默认参数设置与现有策略一致,为前一日,K1=k2=0.7.[/font][/font][/color]
[color=#9baaa8][font=Verdana][font=微软雅黑]注:文字内容来源于网络,代码原创[/font][/font][/color]

页: [1]
渠道·推广(20年运营值得信赖!)▼:温馨提示:期货论坛稳定、流畅的访问体验有赖于赞助商的广告支持,赞助商业务内容非本站官方业务,期货、证券及外汇投资均有亏损的风险,访问赞助商广告即代表您已了解其中的风险。欢迎意向赞助商联系客服或管理员咨询相关事宜。
                     
❤️2025年通过期货论坛开户享受如下优惠政策:政策一:手续费最低交易所+1分起,政策二:日内炒单及大资金享更高比率返还,政策三:保证金可申请交易所标准+0,政策四:开户即享有论坛Prime会员资格(价值199元/年);有意开户咨询管理员或右侧客服! 🚀 论坛付费Prime会员(199元/年或800元/永久)免回复查看下载权限255及以下所有文档(包括但不限于策略、公式、源码、杂志); 😋欧美期货杂志购买、下载与中文翻译:/thread-10603-1-1.html |TB/MC开户优惠政策:/thread-5986-1-1.html;2025年最新交易所手续费表/thread-7537-1-1.html 2025年最全的Python编程与程序化(量化)教程、视频、源码、课件、资源汇总贴:/thread-152864-1-1.html 2025年最全的MultiCharts程序化(量化)教程、视频、源码、课件、资源汇总贴:/thread-88129-1-1.html❤️ 期货论坛与mc合作,通过使用期货论坛优惠码在mc官网购买mc的VIP会员享受折扣优惠 (点击获得“Multicharts14专策版软件使用授权年度会员购买优惠码” ) mag.png【1981年-2025年欧美期货、程序化、量化杂志、期货电子书等中文翻译目录汇总!】(注册登录后可看!) C__LOGO1.png2025年最全的C++期货程序化(量化)教程、视频、源码、课件、资源汇总贴:/thread-160231-1-1.html C++程序化交易软件2025年C++程序化推荐:C++积木式程序化交易系统(简洁、高效、绿色、模块化及最低免费使用),策略模块丰富,绿色安全,使用简单,功能丰富,特别适合定制,推荐有成熟交易系统者及希望低成本长时间实盘客户使用(账户政策、程序化设计及电脑配置等欢迎联系管理员或客服咨询!);( 管理员微信号微信号QQ号QQ电话号码电话号码 );