Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 734
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
Another question then :-)
Before moving the price marker, the horizontal position is calculated through the current screen width
x=width -70;
When I open the sidebar, the marker moves to the right beyond the screen boundary. If I press refresh button in log I can see indicator working, but marker doesn't come back, it appears only on second try. It turns out that OnCalculate is not called every time? How to make the function work permanently?
Another question then :-)
Before moving the price marker, the horizontal position is calculated through the current screen width
When I open the sidebar, the marker moves to the right beyond the screen boundary. If I press refresh button in log I can see indicator working, but marker doesn't come back, it appears only on second try. It turns out that OnCalculate is not called every time? How to make this function work always?
do polling and redrawing inOnChartEvent - CHARTEVENT_CHART_CHANGE
Greetings. Can you tell me something?
If the indicator draws arrows on the chart and the arrows are not objects, is it possible to get the parameters of such drawing from the chart itself or in any other way? I cannot get data from buffers and even run the indicator for testing normally
Greetings. Can you tell me something?
If the indicator draws arrows on the chart and the arrows are not objects, is it possible to get the parameters of such drawing from the chart itself or in any other way? I cannot get data from buffers and even run the indicator for testing normally
Do you have the code of the indicator?
Is there a code for the indicator?
no
Attempts to get data from it, and the indicator itself, have been discussed here
https://www.mql5.com/ru/forum/160587/page165#comment_10221621
I'm studying the examples in the tutorial and one of them fails to compile on the line
'MQL5_PROGRAM_NAME' - cannot convert enum mouse_2.mq5 29 52
Check the work permit for an adviser. And where is the output in the print? This piece of code seems to return something, since there are no errors, then the problem is outside of this piece of code. In this piece, except that division by 0 can occur
Whole code? Yes now .
Line 378 is the same print, when enabled, the EA no longer works.
I have a suspicion that there is an error in the design of the code in line 221 and 223 . No one uses history enumeration, there are few examples, so a mistake is possible. There is one example on the page https://www.mql5.com/en/code/7452 , but it's too complicated for me there.
Division by zero in the Znomer() function, line 206, I excluded.
I look forward to instructions and recommendations. Thank you.
no
Attempts to get data from it, and the indicator itself, have been discussed here
https://www.mql5.com/ru/forum/160587/page165#comment_10221621
Sorry, I don't run the .dll on my computer as a matter of principle, go ahead without me.
Only the indicators here. When using in the parameters I disabled the use of the second one.
The whole code? Yes, now .
Line 378 is the same print, which, once enabled, makes the EA not work anymore.
I suspect that there is an error in the code formatting on lines 221 and 223 . No one uses the replaying of history, there are not so many examples, so this might be an error. There is one example on https://www.mql5.com/ru/code/7452 , but it is too complicated for me.
I excludeddivision by zero in the Znomer() function, line 206.
I'm waiting for instructions and recommendations. Thank you.
The excess((2*psd*usd)*((2*psd*usd)-C))/(C-1)) in the formula.
To the degree: ^0.5 is not *0.5
If there is not a single trade on the looked through symbol and majik, or there is not a single profit or loss, or there is only one pair (C=1), we will get the division by 0.
Before the formula itself, you should check that psd and usd are > 0, and C !=1
Profitable pairs are calculated with profit > 1, loss < 1, with profit=1 are not analyzed, i.e. 1 also has to be included somewhere in this or that group.
In your function, it would be better to first select transaction numbers matching the symbol and magic number and then check if their number has changed, if so - recalculate zn, if not - return zn (zn in this case do not zeroize and check != 0 will not be needed when printing)
The owl stops working, because it relies on variables ww and nn, and when your function works, they change and mess up the owl algorithm.
Nothing would have compiled if there had been a code design error.