Maximum and minimum visible quotes - page 5

 
Unfortunately, we do not have all the answers.
 
Obtaining the vertical and horizontal size of the current graph in pixels is currently an unsolvable task ? Renat, did I understand you correctly?
 
Getting the vertical and horizontal size of the current graph in pixels is currently an unsolvable task ? Renat, did I understand you correctly ?

My answer was a general answer to the general question "some have been blatantly ignored for a long time. Why ?"

And it's elementary to determine screen sizes - you've pretty much figured it out yourself, haven't you ?

#import "user32.dll" int GetClientRect(int hWnd,int lpRect[]); //+------------------------------------------------------------------+ //| script program start function | //+------------------------------------------------------------------+ int start() { int rect[4]; //---- int hwnd=WindowHandle(Symbol(),Period()); if(hwnd>0) { GetClientRect(hwnd,rect); Print("Left: ",rect[0]," Top: ",rect[1]," Right: ",rect[2]," Bottom: ",rect[3]); } //---- return(0); }
 
Dear Renat!

This code compiles successfully, but when executed, it displays the following message in the logs:

2006.08.28 07:51:05 ____pixel EURUSD,M1: removed
2006.08.28 07:51:05 ____pixel EURUSD,M1: expert stopped
2006.08.28 07:51:05 ____pixel EURUSD,M1: dll calls are not allowed; 'user32.dll'-'GetClientRect'
2006.08.28 07:51:05 ____pixel EURUSD,M1: loaded successfully.

Checked with Windows XP and Win98, same result. Build 195.
 
What could the line "dll calls are not allowed; 'user32.dll'-'GetClientRect'" mean?
 
Sinful, I repent, I'm sorry. I allowed the dll to be imported and it all worked.

This is the first script of its kind for me. Thought I had glitches on my machine, old operating system, copied user32.dll library to libraries folder, tried void GetClientRect, bool GetClientRect. And a simple thing opened ...

I won't repeat this error again, I swear.

Thank you very much !!!
 
Dear developers !

When solving a forward and reverse conversion problem

pixel_Y -> quote, quote -> pixel_Y

the following question arises:

How to determine the values of maximum and minimum quotes visible on the vertical axis ( marked in the figure ??? above and below ), if High 1.8600, Low 1.8400 and vertical chart size in pixels 500 are known ? 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 per cent of the difference between the highest and lowest prices at the top and bottom. <br / translate="no">
By the way, it's not the price but the number of pixels between the highest and the lowest price.


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

How is this possible when the same number of pixels ( 5% ) is added from the top to High and from the bottom to Low ?
 
The distances from Low to the lower limit of the chart and from High to the upper limit of the chart often do not coincide, especially on small periods. <br / translate="no">

I will answer this question in order not to bother developers:

I've been working with mt4 for a year already, but I've never seen anything like this...
 
Real example: EURUSD, M1

High 1.2729 Max visible value 1.2730 delta 0.0001
Low 1.2695 Min visible value 1.2690 delta 0.0005
Reason: