龙听期货论坛's Archiver

C
+
+


 微信: QQ:

龙听 发表于 2020-10-21 06:54

【MultiCharts(MC)程序化(量化)网上培训学习系列】第84节:股指主力合约与指数结合设计进出点策略程式码及回测效果

[attach]24564[/attach]

[size=14.4px]1、效果图;[/size]

[size=14.4px]2、通过[/size][size=14.4px]期货[/size][size=14.4px]论坛推荐新开立期货账号享受特惠政策:[/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、代写与求助:[/size][url=http://www.qhlt.cn/forum-109-1.html]http://www.qhlt.cn/forum-109-1.html[/url][size=14.4px];[/size]

[size=14.4px]5、期货论坛[/size][size=14.4px]策略[/size][size=14.4px]源码[/size][size=14.4px]区:[/size][url=http://www.qhlt.cn/forum-109-1.html]http://www.qhlt.cn/forum-109-1.html[/url][size=14.4px] ;[/size]

[size=14.4px]6、期货论坛官方MC[/size][size=14.4px]量化[/size][size=14.4px]策略群,对视频中策略有想法、建议、优化以结交量化好友,动动手,扫二维码加入微信群,跟一众量化好友切磋吧[/size]

龙听 发表于 2020-10-21 06:55

视频地址:[mp4]http://mp4.qhlt.club/Rec%200084.mp4[/mp4]

龙听 发表于 2020-10-21 06:55

视频中策略程式码部分:
**** Hidden Message *****

龙听 发表于 2020-10-21 06:56

策略在IF2011合约5分钟线图上面运行效果及回测
[attach]24565[/attach]

[attach]24566[/attach]

龙听 发表于 2020-10-21 06:57

策略在IF2011合约1分钟线图上面运行效果及回测
[attach]24567[/attach]


[attach]24568[/attach]

龙听 发表于 2020-10-21 07:02

简评:
这个策略仍然有些不完整,今天白天优化好,也欢迎网友一起优化。

龙听 发表于 2020-10-21 14:21

进行了修正 ,加了下午三点之前5分钟出场
[code]
Input:len(20);

var:mp(0);

mp = marketposition * currentcontracts;

condition1 = Close < Close of data2;

condition2 = Close > Close of data2;

condition3 = Average(close,len) > Average(close,len)[1];

condition4 = Average(close,len) < Average(close,len)[1];

condition51 = Close < entryprice(0);

condition52 = Close > entryprice(0);

if condition1 and condition3 then buy("L_E") next bar at Highest(high,len) stop;

if condition2 and condition4 then sellshort("S_E") next bar at Lowest(low,len) stop;

//time-exit model

if Time>1455 and time <1500 then begin
if mp=-1 then buytocover("short-exit at 14:55")1 shares next bar at market;
if mp= 1 then sell("long-exit at 14:55")1 shares next bar at market;
end;

if Time>2255 and time <2300  then begin
if mp=-1 then buytocover("short-exit at 22:55") 1 shares next bar at market;
if mp= 1 then sell("long-exit at 22:55") 1 shares next bar at market;
end;

[/code]

龙听 发表于 2020-10-21 14:23

在股指2011上面1分钟线图
[attach]24645[/attach]

徐永礼 发表于 2020-10-21 17:59

感谢版主分享

本来周 发表于 2021-3-8 09:17

谢谢分享

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