OPEN-SOURCE SCRIPT

Mean-Reversion Swing Trading Strategy v1

Updated
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)
Release Notes
Minor code cleanup
meanreversionswingtradingTrend Analysis

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer