Hello,
this position is sent with magic number -1.
When i'm hover the position, MT5 shows me this ID, but the position have Magic -1.
It's a MT5 bug?
Thanks so much
Where did you see you can use a negative magic number ?
Where did you see you can use a negative magic number ?
Thanks for your reply.
I have developed some function and EAs that placed order via Negative Magic Number, and it works fine for many years now.
When i call PositionGetInteger( POSITION_MAGIC ) it will return correctly -1 if i use -1 in the MqlTradeRequest struct.
Now i would like to know, the possibility that i have now to place order with Negative Magic Number will remain or will be removed?
Thanks
Please tell me if new release will be released because i need to update all the EAs.
Thanks
Thanks for your reply.
I have developed some function and EAs that placed order via Negative Magic Number, and it works fine for many years now.
When i call PositionGetInteger( POSITION_MAGIC ) it will return correctly -1 if i use -1 in the MqlTradeRequest struct.
Now i would like to know, the possibility that i have now to place order with Negative Magic Number will remain or will be removed?
Thanks
It works because a long or a ulong have to same bits representation but is not interpreted the same, -1 stored in a ulong is interpreted as 18446744073709551615.
If it was displayed as -1 in previous build it was a bug and it's now fixed.
It works because a long or a ulong have to same bits representation but is not interpreted the same, -1 stored in a ulong is interpreted as 18446744073709551615.
If it was displayed as -1 in previous build it was a bug and it's now fixed.
Ok Thanks, so it will works because PositionGetInteger casts a ulong in long. But the real magic will be always in This case (-1) 18446744073709551615 because in terminal it will displayed as ulong.
Maybe someone needs to fix it in here too:
ORDER_MAGIC ID of an Expert Advisor that has placed the order (designed to ensure that each Expert Advisor places its own unique number) long
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
this position is sent with magic number -1.
When i'm hover the position, MT5 shows me this ID, but the position have Magic -1.
It's a MT5 bug?
Thanks so much