【MultiCharts(MC)程序化(量化)网上培训学习系列】第96节:肯特納通道(KC)经典版策略程式码及回测
[attach]25791[/attach]【MultiCharts(MC)程序化(量化)网上培训学习系列】第96节:肯特納通道(KC)经典版策略程式码及回测
1、效果图;
2、通过期货论坛推荐新开立期货账号享受特惠政策:[url]http://www.qhlt.cn/thread-25049-1-1.html[/url];
3、通过期货论坛开立期货账号并绑定MC享受专属优惠政策:[url]http://www.qhlt.cn/thread-80442-1-1.html[/url];
4、代写与求助:[url]http://www.qhlt.cn/forum-109-1.html[/url];
5、期货论坛策略源码区:[url]http://www.qhlt.cn/forum-109-1.html[/url] ;
6、期货论坛官方MC量化策略群,对视频中策略有想法、建议、优化以结交量化好友,动动手,扫二维码加入微信群,跟一众量化好友切磋吧:[url]http://www.qhlt.cn/thread-262-1-1.html[/url] ; 视频链接地址:[mp4]http://mp4.qhlt.club/Rec%200096.mp4[/mp4] 视频中策略程序码:
[code]Input:avglength(40),atrlength(40);
var:upband(0),dnband(0),liquidpoint(0),movavgval(0);
movavgval = Average((high+low+close)/3,avglength);
upband = movavgval + AvgTrueRange(atrlength);
dnband = movavgval - AvgTrueRange(atrlength);
if movavgval > movavgval[1] then buy("kcbuy") next bar at upband stop;
if movavgval < movavgval[1] then sellshort("kcsell") next bar at dnband stop;
liquidpoint = movavgval;
if marketposition = 1 then sell next bar at liquidpoint stop;
if marketposition = -1 then buytocover next bar at liquidpoint stop;
[/code] 在螺纹上面回测
日线:
[attach]25792[/attach]
[attach]25793[/attach] 2小时周期:
[attach]25794[/attach]
[attach]25795[/attach] 1小时周期:
[attach]25796[/attach]
[attach]25797[/attach] 第96节:肯特納通道(KC)经典版策略程式码及回测
页:
[1]