Download MetaTrader 5

How to change magic number of open trades?

To add comments, please log in or register
Point Zero
795
Point Zero  

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.

ydrol
593
ydrol  
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()
Alain Verleyen
Moderator
31181
Alain Verleyen  
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.
Point Zero
795
Point Zero  
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!

Ian Venner
2584
Ian Venner  

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.

ydrol
593
ydrol  
Or just simply access it before 28 days.
Alain Verleyen
Moderator
31181
Alain Verleyen  
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.
Tjipke de Vries
6326
Tjipke de Vries  
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

Keith Watford
Moderator
9642
Keith Watford  
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.

Tjipke de Vries
6326
Tjipke de Vries  
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

Keith Watford
Moderator
9642
Keith Watford  
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

To add comments, please log in or register