How to change magic number of open trades?

 

Good afternoon,

I am trying to change the magicnumber or the comment for open trades, in order to apply a different management to them in the future.

It seems it cannot be done, but I would like to confirm. Is there a way to do this?

Thanks in advance.

A.

 
Hi, You cant, to my knowledge. Maybe track the information in a GlobalVariable (exipres after 4 weeks no access) or a file, indexed by OrderTicket()
 
flaab:

Good afternoon,

I am trying to change the magicnumber or the comment for open trades, in order to apply a different management to them in the future.

It seems it cannot be done, but I would like to confirm. Is there a way to do this?

Thanks in advance.

A.

No, it can't be done. You have to manage your trade in your EA, using Global Variables of the Terminal as proposed by ydrol, or a file, or any other way you like.
 
angevoyageur:
No, it can't be done. You have to manage your trade in your EA, using Global Variables of the Terminal as proposed by ydrol, or a file, or any other way you like.

But global variables expire :-( I don't want the Ea to "forget" what it has to do with the trade :'(


Ok, thanks anyway!

 

Yes they expire that doesnt mean you cant make a new one before it does. Regular files dont expire at all, write the data to a file too then you have backup.

 
Or just simply access it before 28 days.
 
flaab:

But global variables expire :-( I don't want the Ea to "forget" what it has to do with the trade :'(


Ok, thanks anyway!

They expires after 4 weeks. If it's not sufficient you can use other techniques, as I suggested.
 
flaab:

Good afternoon,

I am trying to change the magicnumber or the comment for open trades, in order to apply a different management to them in the future.

It seems it cannot be done, but I would like to confirm. Is there a way to do this?

Thanks in advance.

A.


If you wanna do that then it might be you gonna do it in an other way

The EA where the trades comes from isn't it possible to change there the magicnumber

if so then it will trade with an other magicnumber

the trades still open with the old magicnumber you can handle with a different management

 
flaab:

But global variables expire :-( I don't want the Ea to "forget" what it has to do with the trade :'(


Ok, thanks anyway!


GV expire if not accessed for 4 weeks.

I think that it would be very unusual for an EA not to refer to a variable for 4 weeks.

 
GumRai:


GV expire if not accessed for 4 weeks.

I think that it would be very unusual for an EA not to refer to a variable for 4 weeks.


another point is how do you make your globalvariable

it can happen if you don't do it right and you test your ea in strategytester while it is also working on a chart

that the globalvariable on your account is changed while you do the test

 
deVries:


another point is how do you make your globalvariable

it can happen if you don't do it right and you test your ea in strategytester while it is also working on a chart

that the globalvariable on your account is changed while you do the test


That is true.

When I use GVs I have an input for the GV name (to which I then + Symbol() etc ) and will make sure that it is different between uses of the EA, including when testing

Reason: