Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1249
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
Can you tell me if there is a hook for the mql5 indicator? To set two display properties.
And somehow bind different output, each to its own mapping property.
Yes, there is. But it is only for mql5 and it would not work with the Market. In indicators you have to search for an indicator with the name of the second one and if it is not present, then ChartIndicatorAdd().
There is. But only for mql5 and it won't work for Market. In indicators you have to search for an indicator with the name of the second indicator and if it is not present, then ChartIndicatorAdd().
You have two indicators. Not one with simultaneous double rendering property on the main chart and in the subwindow.
But it will do as a variant of simultaneous launching of two indicators. But the data will need to be obtained from two indicators, not from one.
Well that's two indicators. Not one with simultaneous dual property of drawing on the main chart and in the sub-window.
Although, as a variant of simultaneous launching of two different indicators, it will do. But the data will need to be obtained from two indicators, not from one.
Yes, that's right, the meaning was to draw on the main chart and in the subwindow, from one code.
Use your own drawings on the main chart from the subwindow.
That's where the snag comes in. How do you draw from the subwindow to the graph?
If you have an example, it will be clearer.
Please help me with a problem I have encountered. I didn't understand why the calculation I tried didn't help calculate the margin. I am using the formula from:
h ttps://www.mql5.com/ru/docs/constants/environment_state/marketinfoconstants?#enum_symbol_calc_modeBut the problems remained.
Tell me how to translate this code from MQL4 to MQL5:
?
I tried a lot of variants, here is one of them:
I tried a lot of variants, here's the code of TimeDayMQL4 and iTimeMQL4 functions created in MQL4 compatibility library:
But it still doesn't work, I get 1970...
Tell me how to translate this code from MQL4 to MQL5:
?
It's easy. Follow this article: https://www.mql5.com/ru/articles/81
It's easy. Follow the article: https://www.mql5.com/ru/articles/81
Updated my post. Tried it, it doesn't work. I get this value in the variables: D'1970.01.01 00:00:24'
I also use TimeMonthMQL4 and TimeYearMQL4Please help me with a problem I have encountered. I didn't understand why the calculation I tried didn't help calculate the margin. I am using the formula from:
h ttps://www.mql5.com/ru/docs/constants/environment_state/marketinfoconstants?#enum_symbol_calc_modeBut the problem remained.
I haven't figured it out - no clue unfortunately.
Yes, that's right, the point was to draw on the chart and in the subwindow, from the same code.
Here's the hitch. How to draw from the subwindow to the chart?
If you have an example, it will be easier to understand.
There are two ways to display it on the chart:
In any case, we will have to make an additional buffer that will not be displayed in the data window, but from which these data can be obtained. The values that can be used for obtaining data from the main window will be written to the buffer. Then it will be possible to receive data both from the sub-window and the main chart from one indicator.
Or, it is more convenient to first write all calculated data for each bar into this buffer and then use this data to build the main chart in the main window. How it is plotted is up to you. I would choose Kanvas.
Updated my post. Tried it, it doesn't work. I get this value in the variables: D'1970.01.01 00:00:24'.
I also use TimeMonthMQL4 and TimeYearMQL4From the article that Jaffer cited