
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
You can see the comments, which had to be removed.
The purpose of TradeOrdersArray and ClosedOrdersArray arrays is described there. And some more.
Functions CorrectPrice() and DrawArrowOnChart() have not yet been defined.
I posted it here - http://forexsystems.ru/phpBB/viewtopic.php?p=4380#4380
Had to drag all variables from init() block to header - otherwise variables are not visible. My first error.
The second one is that the compiler is swearing at my attempt to set the default value of a parameter in the function to NULL.
Third, the compiler doesn't crash when an undefined/undefined function (CorrectPrice() and DrawArrowOnChart() ) is encountered in the code.
Perhaps it will stumble upon NULL and won't complain further.
The function definition is stupid - I copied from dictionary, so if developers will blame me for wrong declaration ....
Tomorrow I'll try to redefine OrderClose() - it will be easier to explain the testing idea there.
PS Two people have already downloaded it - there is hope
Rosh, I figured out how to insert Russian text in this forum (I had to figure it out myself :)
When you copy the code in the editor, you should put it in Russian. And when you paste it into a forum, respectively, as well.
And all the comments will be saved ;)
Here's a good example to the discussion about the empty operator.
Implicit type conversion is much worse and more dangerous than ";" after a parenthesis.
In this case we have an explicit error, but the compiler won't even generate a warning.
Rosh,
the page went away again.
I just wanted Renat to look at it himself and find the error.
But it seems they don't look here or think my post is stupid.
(quote - "we don't answer silly questions ..." - :))
This is on the topic of disadvantages of MQL syntax (and/or compiler).
The compiler will not respond to this error, even though it could warn you about it.
I would simply prohibit such errors in a language (implicit type conversion).
To be specific.
The TradeOrdersArray array has type double.
In several places, you've assigned string values to it.
For example:
The compiler will eat it all up, and even the tester will work, but not the way you wanted.
And it's hard to look for such an error, especially if it was made a month ago,
and only showed up today when you added a few lines to the program.
(Plz., fix the script - page is gone, it's not convenient to look.)
Here is this declaration
But I just copied from dictionary by pattern.
I suspect you can't.
Only in 2 different arrays.