Questions from a "dummy" - page 255

 
Agat:

It's not working again. If I add lines about minimum - maximum (or manually) to the code of the required indicatorhttps://www.mql5.com/ru/code/537?source=terminal5_mql5, it is not drawn at all. It itself is not drawn to the edge of the window, that's the problem, that's why I wanted to add levels, to see where the boundary of its drawing is.

Ideally, of course, you want it to go from window edge to window edge. Is there any way to achieve this?

Maybe I didn't put it that way. It draws normally, with the top and bottom on the same level line ending in a drawing. But there is a gap between these lines and the edges of the window. So is it just possible to remove these gaps or not?
 
Agat:
Maybe I didn't put it that way. It draws normally, at the top and bottom the drawing ends on the same level line. But there is a gap between these lines and the edges of the window. So just these gaps can be removed or not?
Show me a screenshot of what you see there! ))) It's not very clear what you see in words and what you want to get. Mark with arrows on the screenshot what gaps you have to get rid of.
 

Here's

 
Agat:

Here is

If you mean the gaps from the maximum/minimum of the indicator sub-window to the maximum/minimum of the indicator values, then I have written in this post which functions to explore:

Forum on Trading, Automated Trading Systems and Trading Strategy Testing

Questions from Dummies

tol64, 2013.06.28 10:30

Yes. You will need to follow the events and constantly monitor the new highs and lows on the bars you see in the window. For that, look at OnChartEvent() and IndicatorSetDouble() functions in help and all identifiers to them.

P.S. And ChartGetInteger().

Or do you have any questions? Start writing the code and then show what exactly failed.


 
Thank you!
 
There are questions, of course. How does the indicator know that it should draw from one red line to the other that I drew? Why not higher or lower? Where is this gap defined? There is nothing in the code.
 
Agat:

... If you add lines about minimum-maximum in the code of the desired indicator "..." (or manually), it is not drawn at all.

It doesn't work that way. The gap interferes, of course. When the indicator reaches the edge of the window, this is a critical event. You are sitting here wondering whether you have or haven't reached it.
 
Agat:
There are questions, of course. How does the indicator know that it should be drawn from one red line to the other that I have drawn? Why is it not higher or lower? Where is this gap determined? There is nothing in the code.

There are some default values. For the current position, you can even set manually, in the indicator settings. Scale tab. But since the visible minimum and maximum are different at the current moment or when using chart scrolling, then it is possible to correct it with MQL5. You want to have no gaps at all. Why do they bother you (gaps)?

The maximum and minimum adjustments are relevant only for the main (price) chart, because there, if the series of graphical indicators go far beyond the visible symbol prices, they simply cannot be seen. That is, maximum and minimum on the price chart are automatically corrected only for the prices of the instrument.

For indicators in the sub-window, highs and lows are corrected taking into account all of the chart series. But you can set your own values with MQL5 if you need to.

Forum on trading, automated trading systems and strategy testing

These These are questions from Dummies

Agat, 2013.06.28 11:51

It doesn't work that way. The gap is certainly in the way. Reaching the edge of the window is the most important event. And you're sitting here wondering if you've reached it or not.
What does the window edge have to do with it? Do not make life harder for yourself. )) Keep track of the indicator values and the values of the levels the indicator reaches.
 
I've been trading for eight years now and I know what's involved, what's not, what I need and what I don't need. If you don't know, just say I don't know and that's it
 
Agat:
I've been trading for eight years now and I know what's involved, what's not, what I need and what I don't need. If you don't know, just say I don't know and that's it.
Well, why are you so quick to criticize me? I have actually listed all the options for your question. Not enough? There aren't any others. Or do you want a ready-made code? If yes, you'd better write that you need a ready-made code. ))