龙听期货论坛'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元/年),开户咨询管理员或右侧客服! 😋欧美期货杂志购买、下载与中文翻译:/thread-10603-1-1.html |TB/MC开户优惠政策:/thread-5986-1-1.html2025年最新交易所手续费表:/thread-7537-1-1.htmlSC2.png2025年最新中文翻译:/thread-160355-1-1.html;
欧美期货程序化期刊中文翻译目录: 【1982/83.01-12期】 【1984.01-12期】 【1985.01-12期】 【1986.01-12期】 【1987.01-12期】 【1988.01-12期】 【1989.01-12期】 【1990.01-12期】 【1991.01-12期】 【1992.01-12期】 【1993.01-12期】 【1994.01-12期】 【1995.01-12期】 【1996.01-12期】 【1997.01-12期】 【1998.01-12期】 【1999.01-12期】 【2000.01-12期】 【2001.01-12期】 【2002.01-12期】 【2003.01-12期】 【2004.01-12期】 【2005.01-12期】 【2006.01-12期】 【2007.01-12期】 【2008.01-12期】 【2009.01-12期】 【2010.01-12期】 【2011.01-12期】 【2012.01-12期】 【2013.01-12期】 【2014.01-12期】正在更新中...... 【2015.01-12期】待补 【2016.01-12期】待补 【2017.01-12期】正在更新中...... 【2018.01-12期】 【2019.01-12期】 【2020.01-12期】 【2021.01-12期】 【2022.01-12期】 【2023.01-12期】 【2024.01-12期】 【2025.01-12期】正在更新中......
欧美杂志精华: 欧美杂志2025年最新中文翻译 量化交易 技术分析 心理研究 套利/统计 波浪理论 江恩理论 道氏理论 策略开发 动量交易 量化建模 神经网络 资金管理 行为金融 图表/形态 蜡烛/K线 Van K. Tharp Wyckoff 名人采访 投机新手 量化问答(Q&A) 外汇货币 交易池(Pool) TS/MC量化 点数(P&F)图 [基金/ETF] [加密货币] [Algo(Q&A)] [人工智能(AI)] 真实世界 期货世界 《Futures Truth》 《Futures&Options》