You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.
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.
Those are grid values. You can't get them. Ignore the grid.
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).
Those are grid values. You can't get them. Ignore the grid.
OK thx!!
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).
@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.
Hi, if there's still interest in this thread, I have now found a way to calculate it. Basically you need to count how many vertical grid squares in the chart. In mine, there are 15.8 squares (15 same-sized squares plus 0.8 which is at the very top that's less than the normal size) - try to calculate the number of squares as accurately as possible using this method:
1. calculate price gap covered in each square using the scale shown, for example the top full-sized square has lower scale = 4470.12 and upper scale = 4472.39 (yellow arrows) so price gap for each square is 2.27
2. price_max variable in the below code shows 4474.22 and the highest scale shown in the chart is 4472.39 so the gap between top price in the chart and first full-sized square is 4474.22 - 4472.39 = 1.83
3. divide the value from #2 to the value from #1 to get the last grid square size relative to the standard size = 1.83 / 2.27 = 0.8
So there are 15.8 grid squares in the chart.
The range between price_max and price_min when divided by 15.8 will give the price range per square. Good luck!