OPEN-SOURCE SCRIPT
Updated Mean-Reversion Swing Trading Strategy v1

A port of the TradeStation EasyLanguage code for a mean-revision strategy described at
traders.com/Documentation/FEEDbk_docs/2017/01/TradersTips.html
"In “Mean-Reversion Swing Trading,” which appeared in the December 2016 issue of STOCKS & COMMODITIES, author Ken Calhoun
describes a trading methodology where the trader attempts to enter an existing trend after there has been a pullback.
He suggests looking for 50% pullbacks in strong trends and waiting for price to move back in the direction of the trend
before entering the trade."
See Also:
- 9 Mistakes Quants Make that Cause Backtests to Lie (blog.quantopian.com/9-mistakes-quants-make-that-cause-backtests-to-lie-by-tucker-balch-ph-d/)
- When Backtests Meet Reality (financial-hacker.com/Backtest.pdf)
- Why MT4 backtesting does not work (stevehopwoodforex.com/phpBB3/viewtopic.php?f=28&t=4020)
traders.com/Documentation/FEEDbk_docs/2017/01/TradersTips.html
"In “Mean-Reversion Swing Trading,” which appeared in the December 2016 issue of STOCKS & COMMODITIES, author Ken Calhoun
describes a trading methodology where the trader attempts to enter an existing trend after there has been a pullback.
He suggests looking for 50% pullbacks in strong trends and waiting for price to move back in the direction of the trend
before entering the trade."
See Also:
- 9 Mistakes Quants Make that Cause Backtests to Lie (blog.quantopian.com/9-mistakes-quants-make-that-cause-backtests-to-lie-by-tucker-balch-ph-d/)
- When Backtests Meet Reality (financial-hacker.com/Backtest.pdf)
- Why MT4 backtesting does not work (stevehopwoodforex.com/phpBB3/viewtopic.php?f=28&t=4020)
Release Notes
Minor code cleanupOpen-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.