[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 750
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
That's right, I think Rustam hinted at that
I DON'T UNDERSTAND WHY THERE ARE GLOBAL VARIABLES
THEY ARE USED TO OPEN ORDERS
IF AN ORDER HAS A TICKET LARGER THAN 0, THIS FUNCTION SHOULD WORK
WHICH SHOULD CHANGE ALL VALUES OF GLOBAL VARIABLES TO 0 AND NOT OPEN A NEW ORDER AGAIN,
BUT IT SOMEHOW GOES BACK TO THE ORDER OPENING AND OPENS NEW ORDERS ON EVERY NEW TICK.
WHAT IS THE REASON OF THIS STRANGE PHENOMENON?
GLOBAL VARIABLES ARE SET FROM HERE WHEN CLOSING A MARKET ORDER
ALSO HERE IS THE COMPLETE EXPERT ADVISOR
PEOPLE, HELP ME, I DON'T UNDERSTAND...
Where is the block that fills these variables with values?
I would like to see the exact code of your Expert Advisor in one piece, in the form in which it is compiled and tested.
Not in pieces, because this question has been hanging around for quite a long time, and it has been answered more than once, but because of these pieces, no one can fully understand the whole picture of the problem.
So please show the whole picture so there is no confusion.
Where is the block that fills these variables with values?
I would like to see the exact code of your EA in one piece, in the form in which it is compiled and tested.
Not in pieces, because this question has been hanging around for quite a long time, and it has been answered many times, but nobody can completely understand the whole picture of the problem because of these pieces.
So please show the whole picture so there is no confusion.
HERE IS THE WHOLE EA
asking in the "I'll write an EA for free" thread doesn't always get a response?
asking in the "I'll write an EA for free" thread doesn't always get a response?
That's about how often they respond.
asking in the "I'll write an EA for free" thread doesn't always get a response?
I DONT KNOW WHAT'S WRONG WITH MY EA, I'VE TRIED EVERYTHING AND THE ONLY RESULT IS 1 FOR EVERY TICK + 1 PENDING ORDER THE ONLY THING IS WHEN I CLOSE ANOTHER MARKET ONE CHANGES THE VARIABLE OPENS ANOTHER ONE AND OPENS A NEW ONE WITH EVERY TICK
In progress...
Most probably, the bug is in the block filling these variables with values (in the for loop), I've already found one error (in OrderSelect()) there, but the result has not changed yet. It seems to be a bug somewhere in the logic of the block.
P.S.
Please change to normal symbol case.
The bug is obvious, of course, it opens positions on every tick, since the losing order in the history does not go anywhere, so it finds it on every tick and fills the values of control variables with the same values, and then the block of opening deals triggers.