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
As far as I understand accrual, as in the demo or in the tester...
So when outputting values to the log, only once (for the first time) the parabolic function, i.e. CopyBuffer, returns 0 and not -1, as it should be in case of error (although it shouldn't be either, all data is there, all downloaded, no great multidimensional arrays, no error should occur!) And this happens ONLY in the tester and ONLY ONE time. From here on everything works fine.
In basic code I don't care what the functions return, eventually when it comes to a trade request, the values received for the request are checked by the universal function, and if everything is OK we send the request, if not - we wait for it to be OK...
Try the following code in your function of getting parabolic value.
You'll get something like this in the log
It will explain why you get 0 and not -1.
I'll repeat it for the 3rd time. The data is there, but the indicator values at that moment MAY not yet be calculated. It is written about it in the help!
What is it? Re-cryption or accrual
FC suffers from over-accumulation, MT has had accrual all his life. Single on regular days and x3 on Wednesday(Triple Swap Day should be clarified)...
Try this code in your function to get the value of the parabolic.
You will get roughly this output in the log
This will explain why you get 0 and not -1.
I will repeat it for the 3rd time. The data exists, but the indicator values at that moment MAY not have been calculated yet. It's written in the help!
Exactly, we're getting the parabolic value, not the CopyBuffer response...
ok... change the parabolic function to the one you provided (with the prints).
I add the prints in the for loop (it has no zero protection)
Run it in the tester
and so on forever, until you press cancel
Expert Advisor on the chart
no errors in the journal
look at the picture in the Experts tab; no error messages as well
you can count parabolic points, everything coincides well, on the twelfth one, exit the cycle...
I realised a long time ago that in MQL5 at "that moment" or at that... The data here or there may not be calculated... But it's not right, you have to fix it, not to write crutches in the code
by the way, it's the same with all other indicators, not only with parabolic
i don't know what fc is. i just need to know HOW it will be at the championships.
FC - Forex Club and say its terminal Rumus2.
Do you have a test account for the championship? Try it and everything will be clear...
I realised a long time ago that in MQL5 at "that moment" or at that... The data here or there may not be calculated... But it's not right, you have to fix it, not to write crutches in the code
By the way, it's the same with all other indicators, not only with parabolic.
Let's not create new discussions.
This topic has been discussed many times. It was revisited not too long ago(https://www.mql5.com/ru/forum/1951)
Sitting... Watching...
I will never believe that MQL5 and MQL4 were written by the same team.(((
MQ4 - flying...
MQ5 is child's play. No offence intended - but...(((
Let's not have a discussion.
This topic has been discussed more than once. It was revisited not too long ago(https://www.mql5.com/ru/forum/1951)
I haven't seen this thread... same thing...
The point is that I'm not going to stupidly make checks on every line for all occasions, confusing and cluttering up the code. If that's out of the question then... crutches are added, a big enough project is finally completely redone and working...
And in general, I'm just amazed at this approach... It turns out that not the first time such a question arises (and I'm sure more than once in the future will arise in other people), and every time "for the first time" to spend a lot of your and others' work time to explain what you need to do to bypass this bug ...
The only thing to do is to add into TESTER that recommended in that thread only ONE Sleep(1000) at start of Expert Advisor.
It must not be so that the shell would imply glitches, and those glitches must be avoided in the code. And the TERMINAL is working correctly and correctly, there are NO ERRORS (in this situation). But the operation of the tester is DIFFERENT from that of the terminal.
ps EQU hello:)