Rajandran R Founder of Marketcalls and Co-Founder Algomojo. Full-Time Derivative Trader. Expert in Designing Trading Systems (Amibroker, Ninjatrader, Metatrader, Python, Pinescript). Trading the markets since 2006. Mentoring Traders on Trading System Designing, Market Profile, Orderflow and Trade Automation.

Linear Regression based Mean Reversion Strategy

1 min read

Linear Regression based Mean Reversion strategy is quite similar to Volatility Band – Mean Reversion Strategy. Here the Volatility band is replaced with the upper band = Linear Regression + 2 * Standard Deviation and the lower band = Linear Regression – 2 * Standard Deviation.

Nifty Daily Charts
Linear Regression Based Mean Reversion Strategy

 
Long Entry Rules
1)First candle close below the Lower Band of the volatility Band
2)Second candle close above the lower band
3)Third Candle closes above previous candle

Long Exit Rules
1)One can have a static stops Preferably (2*ATR) initially followed by an trailing stop based on the risk the people are willing to take
2)One can exit with human based decisions or predefined target exits once again ATR based exiits are preferable. Choice of deciding the stop loss and profit targets are left to the readers.

Short Entry Rules
1)First candle close above the Upper Band of the LR Band
2)Second candle close below the Upper band
3)Third Candle closes below previous candle

Short Exit Rules
1)One can have a static stops Preferably (2*ATR) initially followed by an trailing stop based on the risk the people are willing to take
2)One can exit with human based decisions or predefined target exits once again ATR based exiits are preferable. Choice of deciding the stop loss and profit targets are left to the readers.

Short Signal in the Daily Charts of Apple (US stock)
AAPL

Which Market Once Can Practice?

One Can Practice in Equities and derivaties stock markets/indices, However it is not advisable to follow in forex or commodities market

Which timeframe i can practice?

You can practice across different timeframes. Pure Intraday Traders can stick to 5min, 10min or 15min. Positional Traders can stick to hourly or 4 hourly and short term Investors can stick to Daily Charts.

Is this code backtestable?
No it is not as sell and cover signals are not defined and left to the traders to decide upon their type of trading and risk levels. So this strategy can be used by discrete traders.

Download LR Mean Reversion Amibroker afl code

Rajandran R Founder of Marketcalls and Co-Founder Algomojo. Full-Time Derivative Trader. Expert in Designing Trading Systems (Amibroker, Ninjatrader, Metatrader, Python, Pinescript). Trading the markets since 2006. Mentoring Traders on Trading System Designing, Market Profile, Orderflow and Trade Automation.

What is QuantZilla?

Quantzilla is 75+ hours of code mentoring program designed for noncoders who want to learn the coding program right from designing indicators, scanners, trading...
Rajandran R
58 sec read

Things to Consider While Building a Bracket Order Execution…

Building a Bracket Order Strategy is the most demanded request we got from most of the algomojo traders. This article explains the list of...
Rajandran R
12 min read

PlaceOrder – Multi Broker Exectuion Code Snippets for Amibroker

This tutorial explains how to build a button trading right from scratch and with a click of a button how you can send orders...
Rajandran R
7 min read

3 Replies to “Linear Regression based Mean Reversion Strategy”

Leave a Reply to rajat Cancel reply

Get Notifications, Alerts on Market Updates, Trading Tools, Automation & More