R-Indicator

 

Hello Everyone,


I would like to share this indicator with you today. I have developed it in March 2020 after the flash crash in FX. 

The initial intention was to get an indication for when markets go "out of band". So my attempt was to find some support and resistance levels as well as the oscillating level of a markets structure.

In the end, this is the result. 

The source might not be the cleanest and I have left it the way it was in my own dev code base. So it might have some dead code snippets in it and not every calculation is done the most efficient way possible.

Therefore, anyone who would like to support or take the lead of the source, I highly appreciate any constructive contribution.


Attached is a compiled version as well as the main source and a helper file.


R-Indicator on Gold 1 Minute TF, settings from attached file

Files:
r.ex5  120 kb
r.mq5  166 kb
 

In your end-of-life check, instead of causing a division-by-zero exception you might just call ExpertRemove().

And it's probably better to put this project into the codebase.

 
lippmaje:

In your end-of-life check, instead of causing a division-by-zero exception you might just call ExpertRemove().

And it's probably better to put this project into the codebase.

 
The documentation is unclear about the behaviour inside indicators.

https://www.mql5.com/en/docs/common/expertremove

As far as I understand, it does not stop immediately, but sets the StopFlag.

This function is designed to kill the app from being executed.

That's why I chose the div/zero.

But thank you for in fact looking into the source.

Hope it provides you assistance in your trading.
Reason: