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
No way, it's the same thing, a completely different expert. Use mine, fill in the missing details
I DON'T MEAN THE ORIGINAL ONE, I MEAN THE ONE I GLUED TOGETHER FROM YOUR PARTS... BUT THANKS A LOT FOR THE LESSON WITH THE ARRAY !
BUT THE QUESTION STILL REMAINS... HOW TO GET AROUND THE SELECT ERROR... IT'S JUST AN EXPERT WITH AN ARRAY... YOU CAN'T ALWAYS FOLLOW THIS PATTERN...
In short, if you don't zero the variables, they are not zeroed anywhere else, and nothing in your original version works. If you zero them out at the end, then the EA works, but you have a line, for example, if(OrderType() == OP_BUYSTOP&DB==1){OrderDelete(OrderTicket(),CLR_NONE);return(0);}
And nothing works, because a limit order can go first and the market order only after it, and this condition will never be met and the pending order will not be deleted. So, your Expert Advisor only works when the order sequence in the terminal is in accordance with the algorithm, as you have understood it rarely happens in 11 years 90 deals have been opened, I checked it. So the conclusion is the wrong structure of the programme, or rather the total dependence of one iteration on another during the overshoot.
WELL, THERE'S OBVIOUSLY SOMETHING WRONG... SO I'VE BEEN LOOKING FOR IT...
YOU ALSO HAVE A BUG IN YOUR CODE... IT DOES NOT MODIFY BUY POSITIONS, SO IF A BUY STOP TRIGGERED, THE ORDER IS PLACED WITHOUT A STOP AND TAKEAWAY AND OTHERS ARE NOT OPENED
NO DATA DB[2]==0 DB[3]==0 ALSO
YOU ALSO HAVE A BUG IN YOUR CODE... IT DOES NOT MODIFY BUY POSITIONS, SO IF A BUY STOP TRIGGERED, THE ORDER IS PLACED WITHOUT A STOP AND TAKEAWAY AND OTHERS ARE NOT OPENED
NO DATA DB[2]==0 DB[3]==0 ALSO
Slava, your problem is that you don't accept new ideas... You've been given a different approach, but you expect a ready solution...
It's up to you to decide how to deal with possible problems with orders - requotes, incorrect prices and so on...
Yeah, I fixed it myself, I just forgot to put
in the uploaded file.
I decided to rewrite all my EAs using an array... i am thinking how to add 2 more variables - order lot and order profit and 2 orders for bylimit and selligit
into the order lookup table
are there any limitations on the number of variables horizontally and vertically ? and variables before the start [4] is it the number of orders or the number of variables in each order ?