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
The geometric dimensions of the graph are unchanged.
FirstVisibleBar( ) = BarsPerWindow( ) - indent from right edge;
BarsPerWindow( ) = const, not dependent on period and data.
indent from right edge = const, not dependent on period and data.
FirstVisibleBar( ) = BarsPerWindow( ) - indent from the right edge;
Where did you get this formula from?
The first visible bar on the chart and the number of bars fit into the chart window have nothing to do with each other
Under these conditions, FirstVisibleBar( ) still has the wrong start value when switching periods.
So what? Swipe the chart right and left, at the beginning (with the home button) and look at the value produced by the FirsVisibleBar function. But be sure to disable autoscrolling of the chart before doing so.
Which system functions and libraries need to be connected to
- getting the vertical and horizontal size of the current chart in pixels;
- Get maximum and minimum visible quotations of the current chart;
- get the total number of expanded chart in the window ???
Maybe it makes sense to complement MQL4 language with appropriate functions ?
Why?
Despite the indentation, the chart window can be filled completely.
And despite the lack of indentation, the chart window may be not filled.
I personally find jumps of 20 times or more and delays in FirstVisibleBar( ) unacceptable.
Which system functions and libraries must be included to
- getting the vertical and horizontal size of the current chart in pixels;
- obtain the maximum and minimum visible quotations of the current chart;
- get the total number of expanded chart in the window ???
Maybe it makes sense to complement MQL4 language with appropriate functions ?
Thank you.
2. There is no special function. You can calculate by yourself, based on FirstVisibleBar() and BarsPerWindow()
3. What is "total number of graphs in the window"? If it is a subwindow with indicators, the built-in function WindowsTotal() will help. If it is about open charts in the client terminal, then it cannot be determined directly - only through corresponding WinAPI functions in your own dll.
Now we will not add anything to the language.