Download MetaTrader 5

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

To add comments, please log in or register
Millions of traders download codes from MQL5 library. Share your app with them!
Bill Morris
287
Bill Morris 2011.08.26 04:09  
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.

Krzysztof Lorenc
8363
Krzysztof Lorenc 2014.10.22 01:20  

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);

Ernst Van Der Merwe
4737
Ernst Van Der Merwe 2014.10.22 06:12  
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.
12
To add comments, please log in or register