Chart horizontal grid line values? - page 2

 
kypa:

Squares are in pixels. You may get size of chart in pixels, divide by pixels in a square thus getting a number of squares then divide price max minus price min to number of squares and start building grid from the middle.

But there is no point, this grid is just for orientation, it doesn't mean anything and it changes every time the chart is rescaled or resized.

Problem is size of squares changes all the time so can never be 100 per cent accurate with this method unless we can find out how it changes the squares/exact in built formula for calculations or something like that that can predict the square sizes/ amount/positioning of these "squares" exactly
 
whroeder1:

Only if the size of the chart is 10 * grid size in pixels. Change the chart size, grid size does not change.



Main Chart YScale values do change in position (visually, literally from one spot of monitor to other as "squares" change sizes) on my MT4 as ticks come in. Thought I had solution, I don't.


Maybe I'm not being clear. All I need is the Y Axis values of the main chart in current view.

 
nadiawicket: Maybe I'm not being clear. All I need is the Y Axis values of the main chart in current view.

Those are grid values. You can't get them. Ignore the grid.

 
nadiawicket:All I need is the Y Axis values of the main chart in current view.

 I strongly believe you don't need even those.

Right click on chart / Properties, set Fixed Scale true, then try dragging the chart up and down and see what happens with grid values. Or click on price scale and move mouse up and down (while holding the left key pressed).

 
whroeder1:

Those are grid values. You can't get them. Ignore the grid.

OK thx!!

 
kypa:

 I strongly believe you don't need even those.

Right click on chart / Properties, set Fixed Scale true, then try dragging the chart up and down and see what happens with grid values. Or click on price scale and move mouse up and down (while holding the left key pressed).

OK thanks!
 

@kypa:


Greate insight in grid comment.

I encoutered one problem about how to caucluate the  pixels in a square as in “

Squares are in pixels. You may get size of chart in pixels, divide by pixels in a square thus getting a number of squares then divide price max minus price min to number of squares and start building grid from the middle.”


please avdise, thanks.

Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Properties
Documentation on MQL5: Constants, Enumerations and Structures / Objects Constants / Object Properties
  • www.mql5.com
Object Properties - Objects Constants - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Reason: