Rajandran R Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and 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. Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in and Co-Creator of Algomojo (Algorithmic Trading Platform for DIY Traders)

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 Telecom Engineer turned Full-time Derivative Trader. Mostly Trading Nifty, Banknifty, USDINR and 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. Writing about Markets, Trading System Design, Market Sentiment, Trading Softwares & Trading Nuances since 2007 onwards. Author of Marketcalls.in and Co-Creator of Algomojo (Algorithmic Trading Platform for DIY Traders)

How to Perform Machine Learning Using Amibroker and Python

Amibroker is a powerful technical analysis and trading system development platform, used extensively by traders and analysts for developing and deploying trading strategies. Python,...
Rajandran R
5 min read

Preparing the Features Dataset using Amibroker Exploration – Machine…

There are various methods to prepare the feature dataset, which is a crucial input for a machine learning prediction model. One approach is to...
Rajandran R
1 min read

Dynamic Color Coding in Amibroker Profit Tables: A Visually…

Profit tables are a valuable tool for traders and investors to analyze the trading strategy performance of their investments over time. However, the traditional...
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