Download MetaTrader 5

How to keep notes

To add comments, please log in or register
sayo
45
sayo  

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
Moderator
7939
Carl Schreiber  

Manually?

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

Or you can place an Text Object on the Chart.

sayo
45
sayo  

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
Moderator
7939
Carl Schreiber  

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

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

sayo
45
sayo  

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

Carl Schreiber
Moderator
7939
Carl Schreiber  
?? you are using a program that sends your orders?
sayo
45
sayo  
Receives and executes the orders.
Carl Schreiber
Moderator
7939
Carl Schreiber  
do you have access to the code - or are you doing the modifications yourself - manually or by code?l
sayo
45
sayo  

Have access to all codes.

Writing it myself.

Carl Schreiber
Moderator
7939
Carl Schreiber  
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