Download MetaTrader 5
To add comments, please log in or register
No time to learn MQL5? Order your application from a developer!
sayo
45
sayo 2014.10.26 14:16 

I am trying to do repetitive ordermodify task but wish to keep track of which orders had been affected to avoid repeats.

How best can I do this? Ideas needed please.

Cheers

Carl Schreiber
5952
Carl Schreiber 2014.10.26 14:44  

Manually?

I would use the ticket-number to identify different orders.

Or you can place an Text Object on the Chart.

sayo
45
sayo 2014.10.26 14:52  

Thanks for the answer.

Let me try to explain further.

I place an order with ordersend and add a magic no.

I select the order using the magic no & close 50% of the trade based on
an instruction from an external source. I do not want that last instruction
repeated on every tick since it has already been carried out.

Of course, I cannot modify comment, this would have solved the problem.

So, I am looking for a way to add a unique id somewhere that lets the program
know that a specific instruction is done and should not be repeated.

I can easily loop through these to see if the id unique id has been done or not.

Carl Schreiber
5952
Carl Schreiber 2014.10.26 16:14  

You have to save what you have done in your program.

you can use a struct and an array of struct..

sayo
45
sayo 2014.10.26 16:32  

How to do I save? Sorry. I'm fairly new to MQL

Carl Schreiber
5952
Carl Schreiber 2014.10.26 17:12  
?? you are using a program that sends your orders?
sayo
45
sayo 2014.10.26 17:47  
Receives and executes the orders.
Carl Schreiber
5952
Carl Schreiber 2014.10.26 19:40  
do you have access to the code - or are you doing the modifications yourself - manually or by code?l
sayo
45
sayo 2014.10.27 09:18  

Have access to all codes.

Writing it myself.

Carl Schreiber
5952
Carl Schreiber 2014.10.27 10:05  
So if your code does something save that in a counter, a string, a struct - in a logfile, show it as comment?
/
To add comments, please log in or register