Mean-Reversion Swing Trading Strategy v1

A port of the TradeStation EasyLanguage code for a mean-revision strategy described at

"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 (
- When Backtests Meet Reality (
- Why MT4 backtesting does not work (
Release Notes: Minor code cleanup
Remove from Favorite Scripts Add to Favorite Scripts


Strategy invests $100K and places 181 trades on the 1h timeframe from January 2016 to April 2018, netting $300 total.
Negative 6.4 Sharpe Ratio
Savings accounts bear more interest and less drawdown, even with today's rates.

Thanks for porting the code anyway, could be useful in some way other than using the direct strategy itself.
+1 Reply
does it repaint?
+1 Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out