Maximum and minimum visible quotes - page 6

 
Yes... it must be rounding up to 10pp, or counting more than we can see...
 
These discrepancies are related to the vertical scale division value.
 
Dear developers !

When solving the problem of forward and reverse transformation

pixel_Y -> quote, quote -> pixel_Y

the following question appears:

How to determine the values of maximum and minimum quotes visible on the vertical axis (marked in the figure ??? above and below), if we know High 1.8600, Low 1.8400 and the vertical size of the chart in pixels 500 ? The scale of the chart is automatic.


|------------------------------------------------| <- ???
|................................................|
|................................................|
|...........High 1.8600....................|
|................................................|
|................................................|
|................................................|
|................................................|
|................................................|
|................................................|
|............ Low 1.8400...................|
|................................................|
|................................................|
|------------------------------------------------| <- ???


To Slawa

Quotes from your previous answers:

If the scale is automatic, it can be calculated by adding 5 percent of the difference between the highest and lowest prices at the top and bottom. <br/ translate="no">
By the way, 5% is not the price, but the number of pixels between the highest and lowest price.


The distances from Low to the bottom of the chart and from High to the top of the chart often do not coincide, especially on small periods.

How is that possible when the same number of pixels ( 5% ) is added from the top to High and from the bottom to Low ?


 
belkor, this 5% applies when the OHLC line is switched off. When OHLC is on, the distances at the top and bottom can easily be different.

Disable OHLC in the graph properties and try again
 
OHLC is permanently disabled, checked again.

Example: EURUSD M1

High 1.2739 Max visible value 1.2750 delta 0.0011
Low 1.2683 Min visible value 1.2680 delta 0.0003

These discrepancies are related to the vertical scale divisions. The number of visible scale divisions on the verical axis is always an integer.
 
To Slawa

OHLC is permanently disabled, I checked again.

These discrepancies are related to the vertical scale division value, always a multiple of 5 ( 5, 10, 15, 20 points ).

The number of visible scale divisions on the verical axis is always an integer.
 
Congratulations to all programmers and people involved in programming on their professional holiday! Today is the 256th day of the year - Programmer's Day.

I wish all interesting and successful projects, fewer bugs and more grateful users!

Programmer Day is an unofficial holiday of programmers celebrated on the 256th day of the year. The number 256 (28) is chosen because it is the number of numbers which can be expressed by one byte. The holiday falls on September 12 in leap years and on September 13 in non-leap years.

PS To Slawa ???
 
belkor, we are likely to introduce a couple of new functions MinVisiblePrice and MaxVisiblePrice
 
Thank you. We look forward to it.
 
Comment ( " ", BarsPerWindow(), " ", FirstVisibleBar( ), " ", Bars ); <br / translate="no">
Immediately after compilation, we get 490 9104 9304.
After the first tick comes 490 409 9304.


FirstVisibleBar( ) correct ?