Can you programmatically change the value of #property indicator_maximum?

 

I would like to be able to change the value of this property value #property indicator_maximum, in the program. Is it possible? If not, is there another way to dynamically change the window maximum?

What I am trying to do:

I have an indicator that I drop on multiple charts. This indicator shows the difference between a top bollinger band and the lower bollinger band. You may have seen this indicator "BollingerBand3". On a chart like USDJPY where there are only 3 digits, the value could be much higher than the value on say a 5 digit EURUSD. I know I can use the PipPoints kind of solution for the calculation of the digits, but what about a 3 digit? The value is going to much different. I am concerned that if the value is not proportionate, then the indicator will not correctly display the value.

 

no.

create an index buffer that doesn't draw anything and has two values:

myBuffer[0] = maximumForWindow;

myBuffer[1] = minimumForWindow;

Nothing is drawn but MT4 sets the window size to be able to display the buffer values.

 

Old but useful.

Thanks.

 

This guy named as "Phy" used to be a great contributor and suddenly disappeared from mql4 forum... probably due to health issues?

 
abstract_mind:


This guy named as "Phy" used to be a great contributor and suddenly disappeared from mql4 forum... probably due to health issues?

Or a very profitable EA . . .
 
abstract_mind:


This guy named as "Phy" used to be a great contributor and suddenly disappeared from mql4 forum... probably due to health issues?


... good time to start contributing :)
 

double  YourValue;

if ( whatEver)

{

IndicatorSetDouble(INDICATOR_MAXIMUM, YourValue );

}

// i know its an old post but i hope it helps others who come here looking

Reason: