龙听期货论坛's Archiver

C
+
+


 微信: QQ:

龙听 发表于 2023-10-16 06:27

【MultiCharts(MC)程序化(量化)网上培训学习系列】第332节:经典策略范例"万能摆动指标(Universal Oscillator Strategy)策略"程式码、进行展示效果及对螺纹期货进行初步回测

【MultiCharts(MC)程序化(量化)网上培训学习系列】第332节:经典策略范例"万能摆动指标(Universal Oscillator Strategy)策略"程式码、进行展示效果及对螺纹期货进行初步回测

[mp4]http://mp4.qhlt.club/Rec%200332.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][size=14.4px]电报群:[/size][img=120,120]http://p.algo2.net/2023/0622/54be45e3f790e.png[/img][size=14.4px];[/size]

龙听 发表于 2023-10-16 06:30

程式码部分:
**** Hidden Message *****

研究专题:

**** Hidden Message *****

龙听 发表于 2023-10-16 06:55

MC平台梳理后程式码:**** 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-10-16 06:56

策略回测绩效:
[img]http://p.algo2.net/2023/1016/8c52b510870f2.png[/img]
[img]http://p.algo2.net/2023/1016/c8f9c61309fd3.png[/img]
[img]http://p.algo2.net/2023/1016/64cf52ecd9d31.png[/img]
[img]http://p.algo2.net/2023/1016/29f1150f81fec.png[/img]
[img]http://p.algo2.net/2023/1016/0a0923baaffe3.png[/img]

龙听 发表于 2023-10-16 06:58

增加atr移动出场模块后绩效图:[img]http://p.algo2.net/2023/1016/76eb4f2ecd275.png[/img]
[img]http://p.algo2.net/2023/1016/cd665e23cc63f.png[/img]
[img]http://p.algo2.net/2023/1016/aa91d7d98fa2c.png[/img]
[img]http://p.algo2.net/2023/1016/247ae85be8153.png[/img]
[img]http://p.algo2.net/2023/1016/4b6dd82bbd310.png[/img]
[img]http://p.algo2.net/2023/1016/3fbdcf0bd5c1f.png[/img]

龙听 发表于 2023-10-16 06:58

简评:
1,后期优化空间比较大。
2,整体盈利能力不错,建议可以重点研究一下。

化石 发表于 2023-10-16 09:25

{:handshake:}感谢 并学习

龙听 发表于 2023-10-16 21:45

大家注意一下,代码中有处是有些问题的,主要集中在MC版上面,即:

**** Hidden Message *****

斗战胜 发表于 2023-10-22 10:39

谢谢龙版

独孤梦望 发表于 2023-11-2 12:44

学习

绿水青山 发表于 2023-12-12 09:37

{:victory:}

策略编写狂 发表于 2024-2-6 19:22

優秀

小龍 发表于 2024-2-26 19:44

高手

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