Rajandran R Creator of OpenAlgo - OpenSource Algo Trading framework for Indian Traders. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Building Algo Platforms, Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in

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

[wp_ad_camp_5]

 
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 Creator of OpenAlgo - OpenSource Algo Trading framework for Indian Traders. Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, High Liquid Stock Derivatives. Trading the Markets Since 2006 onwards. Using Market Profile and Orderflow for more than a decade. Designed and published 100+ open source trading systems on various trading tools. Strongly believe that market understanding and robust trading frameworks are the key to the trading success. Building Algo Platforms, Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in

Line Trading – OpenAlgo Automation Module for Amibroker Users

The line Trading Automation tool is designed for Manual traders who want to perform level-based trade execution faster and also bring some advanced trade...
Rajandran R
55 sec read

Mini Certification Course on Algorithmic Trading

Welcome to the Mini Certification on Algorithmic Trading using Amibroker and OpenAlgo! This comprehensive 4-part series is designed to equip you with the knowledge...
Rajandran R
1 min read

Pivot Reversal Strategy – Tradingview Pinescript to Amibroker AFL…

Pivot Reversal Strategy is a popular in-built strategy in Tradingview Platform. Here I had attempted to convert the pinescript v5 to Amibroker AFL Code....
Rajandran R
3 min read

3 Replies to “Linear Regression based Mean Reversion Strategy”

Leave a Reply

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