Anyone knows a way to change the magic number of an already placed position?

 

Hi,

I have already placed positions with certain magic numbers, along the way i want to be able to change the magic numbers as i go.

Is there a way to do it through coding?

I know that there is no way manually. But i hope MT has thought about this and gave us the ability to change through code.

I mean if you can set it through code, won't it make sense to also change it through code?

 
I am not absolutely sure, but I do not think so.

Try using comment on positions to do tracking. They in fact update.

Greetings
 
Hesham Ahmed Kamal Barakat: I have already placed positions with certain magic numbers, along the way i want to be able to change the magic numbers as i go. Is there a way to do it through coding?

I know that there is no way manually. But i hope MT has thought about this and gave us the ability to change through code. I mean if you can set it through code, won't it make sense to also change it through code?

No you cannot change the "Magic Number" after placement, neither manually nor programmatically! Modifying it defeats the purpose of its intended purpose. So it makes total sense that it can NOT be changed after the fact.
 
Fernando Carreiro:
No you cannot change the "Magic Number" after placement, neither manually nor programmatically! Modifying it defeats the purpose of its intended purpose. So it makes total sense that it can NOT be changed after the fact.

Why defeats the purpose!

Magic number can be created for many reasons, one of them is to control which positions get closed and which stay open.

So at certain times you would want to change the magic number between being able to close or not.


Magic number is not just for dealing with multiple symbols, thus you wouldn't want to change it. There are many reason that it can be used for.

 
Hesham Ahmed Kamal Barakat:

Why defeats the purpose!

Magic number can be created for many reasons, one of them is to control which positions get closed and which stay open.

So at certain times you would want to change the magic number between being able to close or not.

Magic number is not just for dealing with multiple symbols, thus you wouldn't want to change it. There are many reason that it can be used for.

Read the documentation!

  • "MAGIC: ID of an Expert Advisor that has placed the order (designed to ensure that each Expert Advisor places its own unique number)"
The Magic number is primarily used for identifying which EA (or sub-process of the EA) placed the Order, so as to further manage it during its life-time and for follow-up in historic reporting.
 
Fernando Carreiro:

Read the documentation!

  • "MAGIC: ID of an Expert Advisor that has placed the order (designed to ensure that each Expert Advisor places its own unique number)"
The Magic number is primarily used for identifying which EA (or sub-process of the EA) placed the Order, so as to further manage it during its life-time and for follow-up in historic reporting.

I am not arguing about the purpose you mentioning. I am saying that it would be more beneficial to be able to change it. WHat's the big deal!

 

What part of "defeats the purpose" do you not understand?

Give one reason where it would be "beneficial"?

 

Probably off topic, but since it is about fields of order(s) that can not be changed by user(s) ...

Maybe just one part of an order that are currently not allowed to be changed, would be beneficial to become changeable : the comment

Frankly I never understood why the broker is allowed to change the comment field of an order and users are not

 

Your argument considered, @Hesham Ahmed Kamal Barakat's needs probably are means to track. It is perfectly possible to use 1 unique magic with every order. 

However the reason why it is not possible to change the comment is trade servers being subject to non-trade requests and i would agree it is not beneficial for anyone, except the one tracking some order.

 
Enrique Dangeroux:

Your argument considered, @Hesham Ahmed Kamal Barakat's needs probably are means to track. It is perfectly possible to use 1 unique magic with every order. 

However the reason why it is not possible to change the comment is trade servers being subject to non-trade requests and i would agree it is not beneficial for anyone, except the one tracking some order.

I don't mean changing comment in a non-trading request : that would serve no purpose at all, except for stuff like DDOS or similar s... (ie: changing only the comment should be disallowed)

But changing the comment as a part of legitimate order processing (any legitimate order processing that currently exists) would make some things so much simpler. Just thinking out loud though ...

 

Agreed, it would allow for the order state for the TS logic to reside on the trade server instead of local, this to do local, i also agree, is troublesome to realize, but it is possible.

It will make life easier and logic simpler.

Reason: