Download MetaTrader 5
To add comments, please log in or register
Deposit to your account via Visa QIWI Wallet
Point Zero
827
Point Zero 2014.03.12 16:44 

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 2014.03.12 16:51  
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
28518
Alain Verleyen 2014.03.12 17:00  
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
827
Point Zero 2014.03.12 17:06  
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
2583
Ian Venner 2014.03.12 17:18  

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 2014.03.12 17:20  
Or just simply access it before 28 days.
Alain Verleyen
Moderator
28518
Alain Verleyen 2014.03.12 17:20  
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
6275
Tjipke de Vries 2014.03.12 17:24  
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
7873
Keith Watford 2014.03.12 21:44  
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
6275
Tjipke de Vries 2014.03.12 22:21  
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
7873
Keith Watford 2014.03.13 01:21  
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