[Solved] What's the trick to using #property indicator_maximum? - page 2

 
WHRoeder:
I pointed to RSI because the code does exactly that.

Why are you asking for a working example, when the RSI IS a WORKING Example?

You need to post YOUR code. No code posted, no good answers possible - no mind-readers here.

Are ALL your buffers in the same 1-10 range? If not use #property indicator_buffers n where the first 0-(n-1) buffers are in the 1-10 range.

I found my problem.

I wasn't dropping the indicator onto the chart, I was dropping a template (that had the indicator in it) on to the chart.

When I first dropped the indicator, I unchecked the Fixed Minimum and Maximum because I was thinking that the code would take care of it. I then saved the template, and kept dropping the template (with the unchecked Fixed Minimum and Maximum) on to my charts and couldn't figure out why the scale wasn't fixed.

So you were right all along, I just didn't realize what I was really doing.

 

This is because I found this topic when I searched for how to set value of indicator_maximum automatically.

#property indicator_minimum    0

#property indicator_maximum   n?

It’s solve problem:

 int OnInit{ 

  int n=Period();
   IndicatorSetDouble(INDICATOR_MINIMUM, 0);
   IndicatorSetDouble(INDICATOR_MAXIMUM, n);

 
klore:

This is because I found this topic when I searched for how to set value of indicator_maximum automatically.

#property indicator_minimum    0

#property indicator_maximum   n?

It’s solve problem:

 int OnInit{ 

  int n=Period();
   IndicatorSetDouble(INDICATOR_MINIMUM, 0);
   IndicatorSetDouble(INDICATOR_MAXIMUM, n);

These functions were added to mql4 only recently.
Reason: