Download MetaTrader 5

How to modify magicnumber ?

To add comments, please log in or register
Deposit to your account via WebMoney
wadi2014
116
wadi2014 2013.12.31 15:12 

Hello

i want to make EA that depends on magic number for closing a group of orders but, i want the first order to take its ticket as magic number and that order will be the master of 3 orders and the 3 orders will take the first magic number of the first order.

Example:

int Tic
Tic=OrderSend(Symbol(),OP_BUY,LotSize,Ask,3,Ask-SL*Point*M,Ask+TP*Point*M,"MyEA",Tic,0,Green);

But the problem the magic number will not be taken to the ordersend. So is there any method to make ordermodify to modify new magic number for that order ?

i hope my question is clear .

Tjipke de Vries
6314
Tjipke de Vries 2013.12.31 15:23  
fx2013:

Hello

i want to make EA that depends on magic number for closing a group of orders but, i want the first order to take its ticket as magic number and that order will be the master of 3 orders and the 3 orders will take the first magic number of the first order.

Example:

But the problem the magic number will not be taken to the ordersend. So is there any method to make ordermodify to modify new magic number for that order ?

i hope my question is clear .



how can you get a ticketnumber of a trade before a trade is opend so you can use it as MagicNumber ??

you can't modify magicnumber

whroeder1
14480
whroeder1 2013.12.31 15:35  
The MN is set by the OrderSend. RTFM, which parameter in the OrderModify is the magic number?
Mehmet Bastem
240
Mehmet Bastem 2013.12.31 17:16  
fx2013:

Hello

i want to make EA that depends on magic number for closing a group of orders but, i want the first order to take its ticket as magic number and that order will be the master of 3 orders and the 3 orders will take the first magic number of the first order.

Example:

But the problem the magic number will not be taken to the ordersend. So is there any method to make ordermodify to modify new magic number for that order ?

i hope my question is clear .



ordermagicnumber is not modify.
To add comments, please log in or register