Hi,
My question is - if I have 2 orders open at once, one on let's say EURUSD and the other on GBPUSD and these orders have the same magic number, but I recongize them by Magic Number AND Currency Pair - could this cause any problems?
NO
[...] My question is - if I have 2 orders open at once, one on let's say EURUSD and the other on GBPUSD and these orders have the same magic number, but I recongize them by Magic Number AND Currency Pair - could this cause any problems? The checking code is 100% correct, I have checked a hundred times, however, I am asking particularly about magic numbers, whether there is anything that could happen if there are 2 same magic numbers on orders with different pairs.
for(int pos = OrdersTotal()-1; pos >= 0 ; pos--) if ( OrderSelect(pos, SELECT_BY_POS) // Only my orders w/ && OrderMagicNumber() == Magic.Number // my magic number && OrderSymbol() == Symbol() ){ // and period and symbol
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I have a question about magic numbers. I have my own EA which had unwanted behaviour one day which resulted in large losses, but I wasn't able to repeat this to make sure what the reason was.
My question is - if I have 2 orders open at once, one on let's say EURUSD and the other on GBPUSD and these orders have the same magic number, but I recongize them by Magic Number AND Currency Pair - could this cause any problems? The checking code is 100% correct, I have checked a hundred times, however, I am asking particularly about magic numbers, whether there is anything that could happen if there are 2 same magic numbers on orders with different pairs.
Thank you.