Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 520

 
oxotnik:

Please advise how to make the "Window boundary reached" message appear when the indicator reaches its upper (lower) boundary. Thanks in advance.

Below is the indicator itself.


Add the desired levels to the indicator properties! You'll be able to see what level it has reached, if that's important to you! And make Alert if you need to! Everything is in your hands!
 
oxotnik:

Please advise how to make the "Window boundary reached" message appear when the indicator reaches its upper (lower) boundary. Thanks in advance.

Below is the indicator itself.

int  WindowPriceMax(
   int       index=0   // индекс подокна
   );

https://docs.mql4.com/ru/chart_operations/windowpricemax

Accordingly, the minimum...

 
AlexeyVik:

https://docs.mql4.com/ru/chart_operations/windowpricemax

Accordingly, the minimum...


What if the indicator window is not on the chart?
 
artmedia70:
What if the indicator window is not on the chart?


And the graph itself is 0.
 
artmedia70:
What if the indicator window is not on the chart?


Whatever the question, that is the answer. Nothing was said about the absence of the indicator window. Well, you can put in an EA to check if there is one, and if there isn't, "goodbye".
 
evillive:

And the graph itself is 0.
Uh... ??? What's this about? Where am I? Who am I?
 
AlexeyVik:

Whatever the question, that is the answer. No mention was made of the absence of an indicator window. Well, you can put in an EA to check if there is one, and if there isn't, "goodbye".
Oh-oh-oh-oh. It is because of such decisions that users are spitting at us in the discussion threads of new developments.
 
artmedia70:
Uh... ??? What's this about? Where am I? Who am I?

Well, the other functions that work with the chart, see the chart window as 0. Does WindowPriceMax divide it in any other way? If anything, I haven't really worked with these functions, just to search or create an object in the desired sub-window, and that's all, but 0 was always the main chart window, and the basement started with 1.
 
evillive:
Well, the other functions that work with the chart take the chart window as index 0. Does WindowPriceMax divide them in any other way? By the way, I haven't worked with these functions, just to search or create an object in the necessary sub-window, but 0 has always been the main chart window, and the basement started with 1.

Of course it does:


WindowPriceMax

Returns the maximum vertical scale value of the specified subwindow of the current chart.

int WindowPriceMax(
int index=0 // subwindow index
);

Parameters

index=0

[in] Subwindow index of the current chart (0 - main price chart).


Accordingly, if there is no indicator in the chart, it is impossible to take its data.

 
artmedia70:
Oh-oh-oh-oh. It is because of such decisions that users here later spit at us in the threads with discussions of innovations.

Well, it's not just a user who asked, but a programmer...

Maybe he just needs to put an alert in the indicator, then there will be a window anyway.

To be honest, I suspect that this experiment will come to nothing. After all, the indicator window height depends not only on its readings, but also on the number of bars in the window.

Reason: