Indicators: Rainbow indicator for mt5

 

Rainbow indicator for mt5:

This is an indicator with a rainbow-like display, both for trend or pullback prediction.

Rainbow indicator for mt5

Author: Peter Mueller

 
If you change the period the lines remains in the same place, so I wonder what the parameter period is for.
 
R3forex #: If you change the period the lines remains in the same place, so I wonder what the parameter period is for.

Yes, unfortunately the author "hard-coded" the period parameter.

Change the following lines ...

High = iMA(_Symbol,PERIOD_CURRENT,20,0,MODE_SMA,PRICE_HIGH);
Low = iMA(_Symbol,PERIOD_CURRENT,20,0,MODE_SMA,PRICE_LOW);
Atr = iATR(_Symbol,PERIOD_CURRENT,20); 

... into this ...

High = iMA(_Symbol,PERIOD_CURRENT,period,0,MODE_SMA,PRICE_HIGH);
Low = iMA(_Symbol,PERIOD_CURRENT,period,0,MODE_SMA,PRICE_LOW);
Atr = iATR(_Symbol,PERIOD_CURRENT,period); 

There are also a few other "quirks", but it is up to the author to fix them.

 
Fernando Carreiro #:

Yes, unfortunately the author "hard-coded" the period parameter.

Change the following lines ...

... into this ...

There are also a few other "quirks", but it is up to the author to fix them.

R3forex #:
If you change the period the lines remains in the same place, so I wonder what the parameter period is for.

My apologies, I did hard code this parameter, thanks for giving feedback and notifying me of this error, it should be fixed by now.

 
was the original Rainbow indicator using ATR in the formula? eitherway, this is a very nice use of ATR here and the indicator is decent!