这里分享个我改良过的TB开拓者源码(文华WH8也通用):
Params
Numeric FastLength(5); //快线周期
Numeric SlowLength(20); //慢线周期
Numeric ATRLength(14); //波动率周期
Vars
NumericSeries maFast;
NumericSeries maSlow;
NumericSeries upBand; //上轨
NumericSeries dnBand; //下轨
Begin
maFast = AverageFC(Close,FastLength);
maSlow = AverageFC(Close,SlowLength);
Numeric atrValue = AvgTrueRange(ATRLength);
//多空信号
If(maFast > maSlow) PlotText("多",High+atrValue);
If(maFast < maSlow) PlotText("空",Low-atrValue);
//高低点通道
upBand = Close + atrValue*1.5;
dnBand = Close - atrValue*1.5;
PlotNumeric("上轨",upBand);
PlotNumeric("下轨",dnBand);
End
这个版本做了3处优化:
1. 用ATR动态通道替代固定点数,避免震荡市频繁假突破
2. 增加文字标识直接显示多空信号,新手一眼就能看懂
3. 参数设置更符合国内期货波动特性
现在,我会针对新手小白定期免费分享一些现成的量化交易资料和策略思路,如果你对量化交易感兴趣,或者想通过低成本、低门槛的方法实现量化交易,可以点赞并加我微信,我这边可以教你免费实现量化,手把手3天内实现量化交易。
发布于2025-8-1 10:40 北京


分享
注册
1分钟入驻>
关注/提问
18342365994
秒答
搜索更多类似问题 >
电话咨询
+微信


