fareidzulkifli

Mean Reversion Channel - (fareid's MRI Variant)

Description :
Mean Reversion Channel objective, based on Mean Reversion theory ( everything has a tendency to revert back to its mean), is to help visualizing:
Inner Channel -> Dynamic Support and Resistance
Outer Channel -> Overbought/Oversold Zone which may signal consolidation phase or potential reversal due to unsustainable move

Details on some of the filtering type used for mean calculation can be read in Ehlers Technical Papers: "Swiss Army Knife Indicator" and/or his book "Cybernetics Analysis for Stock and Futures"

Disclaimer:
These study scripts was built only to test/visualize an idea to see its viability and if it can be used to optimize existing strategy.
Any ideas to further improve this indicator are welcome :)
Release Notes: v2.0 Change log:
1. Added Format Inherit
2. Added line extension with labels
Release Notes: v2.1 Change log:
1. label position use bar_index instead of bar_time (bar_time doesn't work as expected approaching week end/week open)
Release Notes: - Added option to adjust the channel size
- Added option to disable line extension and labels
- updated disclaimer in source code
- cleaning code

Notes: Screener for this indicator now available here.
Release Notes: Major Update

█ New Features

1) Multiple Timeframe Analysis
- The script will scan up to 2 higher timeframes (HTF) for its status/condition
- User able to select HTF type (Auto or Custom)
- For Auto HTF, the script will automatically recommend HTF to be scanned
- For Custom HTF, the script will scan the user defined HTF based on the user input screen
- The MTF will also calculate the distance of last traded price from each TF's Mean, displayed as % of last traded price.

2) Display Mode
- Now user able to display/hide the channel
- HTF Status Label available in 2 display mode (Always Display / On Hover)
- For Always Display Mode, the HTF will always be displayed
- For On Hover Mode, the HTF will be displayed only when mouse hovered above the Check MTF label
- Notes: The script will override and always disabled the Line Extension if HTF is enabled and the mode is always displayed

Example:

On Hover Mode without Line Extension

Always Display Mode

MTF Disabled


█ Features Removed

1) Price label removed since TV's built-in price label offered better/cleaner label (To enable it, go to Setting > Chart Setting > Scales > Indicator Name Label)


Thanks to @combotrading for his feedback/idea on HTF
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 a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Kommentarer

Beautiful
100 coins
+2 Svara
Excellent work.
100 coins
+1 Svara
Great work! I've paper traded on this indicator for the last weeks. I'll include it in my regular strategy. Just one query ...
200 coins
Svara
TonioVolcano TonioVolcano
@TonioVolcano, @fareidzulkifli,
Is there any way to manually establish the timeframe/ period for the actual plotted Channel?? I mean, imagine I am seeing the 10MIN candles, but I would like to plot on the chart the 1HR Mean Reversion Channel.

I know the multi-timeframe analysis already provides a good idea of the status of the other timeframes and you can manually select those, but I would like to see the actual channel for a specific timeframe too. This would even allow me to plot two channels on the same chart (... in the same example, I would plot one MRC indicator for 10MIN Channel, and a second MRC indicator for the 1HR Channel... And I would end up with two beautiful channels on the chart ;)

If not available in the settings, is there a way to tweak the code to hard-coded it to 1HR ?? I was thinking the key may be on lines 284-286 from above code, but I am unsure about the specific sentences. Thanks and keep up the great work!
Svara
hi mate!

this is the indicator I was saying that HTF will make it nearer to perfect :)
+8 Svara
fareidzulkifli FlukeTrading
@FlukeTrading, hmm plotting the zone based on htf might not be a good idea especially when the chart is on auto scale mode.

Although i might be able to come up with something close to that, maybe next week :)

Thanks for your input and Happy New Year!
Svara
fareidzulkifli FlukeTrading
@FlukeTrading, hello! I added the HTF features, feel free to check it out and give feedback if you have any idea to further improve it :)
+1 Svara
can i use it on frame5min
+3 Svara
hi, great job on the indicator. I was just wondering how to get the prices to display on the line?

best regards
+2 Svara
Excellent script!
+2 Svara