龙听期货论坛's Archiver






 微信: QQ:

龙听 发表于 2023-5-28 07:25

【MultiCharts(MC)程序化(量化)网上培训学习系列】第315节:经典策略Deviation Dictates strategy trading system程式码、进行展示效果及对螺纹期货进行初步回测

【MultiCharts(MC)程序化(量化)网上培训学习系列】第315节:经典策略Deviation Dictates strategy trading system程式码、进行展示效果及对螺纹期货进行初步回测

[mp4]http://mp4.qhlt.club/Rec%200315.mp4[/mp4]

[size=14.4px]1、注册论坛会员即可免费获得公开课视频[/size][size=14.4px]源码[/size][size=14.4px]及文档;升级至付费会员免回复查看[/size][size=14.4px]策略源码[/size][size=14.4px]、文档;升级至prime会员无阻碍畅游全站[/size][size=14.4px]期货[/size][size=14.4px]策略、源码、回测、优化、视频、教程、图书、文档,具体参考:[/size][url=http://www.qhlt.cn/thread-37840-1-1.html]http://www.qhlt.cn/thread-37840-1-1.html[/url][size=14.4px];[/size]

[size=14.4px]2、通过期货论坛推荐新开立期货账号,可免费获得付费会员或prime会员资格并享受账户特惠政策,参考:[/size][url=http://www.qhlt.cn/thread-25049-1-1.html]http://www.qhlt.cn/thread-25049-1-1.html[/url][size=14.4px];[/size]

[size=14.4px]3、通过期货论坛开立期货账号并绑定MC享受专属优惠政策:[/size][url=http://www.qhlt.cn/thread-80442-1-1.html]http://www.qhlt.cn/thread-80442-1-1.html[/url][size=14.4px];[/size]

[size=14.4px]4、PC购买/服务器托管如何选择及量化软件相关设置指导:[/size][url=http://www.qhlt.cn/thread-105169-1-1.html]http://www.qhlt.cn/thread-105169-1-1.html[/url][size=14.4px];[/size]

[size=14.4px]5、全网最大策略源码区:[/size][url=http://www.qhlt.cn/forum-109-1.html]http://www.qhlt.cn/forum-109-1.html[/url][size=14.4px] ;策略精选推荐优化区:[/size][url=http://www.qhlt.cn/forum-874-1.html]http://www.qhlt.cn/forum-874-1.html[/url][size=14.4px];回测排名:[url=http://www.qhlt.cn/forum-877-1.html]http://www.qhlt.cn/forum-877-1.html[/url];[/size]

[size=14.4px]6、对视频中策略有困惑、想法、建议、优化?欢迎关注管理员微信进行切磋与交流。动动手,扫二维码加入微信群跟一众量化爱好者切磋吧:[/size]
[size=14.4px]管理员微信:[/size][img=120,120]http://www.qhlt.cn/link/wx.png[/img][size=14.4px] 论坛官方微信群:[/size][img=120,121]http://www.qhlt.cn/link/wg.png[/img]

龙听 发表于 2023-5-28 07:28

程式码部分:multicharts平台

**** Hidden Message *****

另附atr移动止盈程式码模块(仅供参考)[code]
Input:atrlen(30),trailatrmult(3);
var:lexit(0),sexit(0),atr1(0),top(0),bot(0);

atr1 = atr(atrlen);

if barssinceentry = 0 then begin //inital high and low
top = high;
bot = Low;
end;

if high > top then top = high; //find the highest point since entry
if Low < bot then bot = low;  // find then lowest point sine entry

if marketposition = 1 then begin // manage long position
lexit = top - trailatrmult*atr1;
if barssinceentry=0 and Close < lexit then sell("Atr-nextdayout") all shares next bar at Open;
if barssinceentry>0 then begin
sell("atr-tail-stop") all shares next bar at lexit stop;
value1 = tl_new(date[1],time,lexit[1],date,time,lexit);
end;
end;

if marketposition = -1 then begin //manage short position
sexit = bot + trailatrmult*atr1;
if barssinceentry=0 and Close > sexit then sell("atr-nextdayout") all shares next bar at Open;
if barssinceentry>0 then begin
buytocover("atr-trail-stop") all shares next bar at sexit stop;
value1 = tl_new(date[1],time,sexit[1],date,time,sexit);
end;
end;
[/code]

龙听 发表于 2023-5-28 07:30

螺纹上面回测绩效:
[img]http://p.algo2.net/2023/0528/2a546016e537f.png[/img]
[img]http://p.algo2.net/2023/0528/43a2db0c7a1d3.png[/img]
[img]http://p.algo2.net/2023/0528/fce934a85e7ef.png[/img]
[img]http://p.algo2.net/2023/0528/86dab5ab8382d.png[/img]
[img]http://p.algo2.net/2023/0528/fe3ccf7d5c97b.png[/img]

龙听 发表于 2023-5-28 07:32

简评:

1、此策略适合中大周期。
2、在回测我发现有时会有做返情况,出场较晚,所以加上一个atr或其它的一个顺势的止盈模块或止损模块效果会好一些。
3、在短周期上面效果就比较一般了。这应该跟短周期中趋势性下降有关。

深刻的小鱼 发表于 2024-3-22 02:03

学习学习

页: [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期】正在更新中......