Is it advisable to use order comments to store metadata?

kasinath  

In my EA, there are certain circumstances in which in clone orders, and will have to later identify them as cloned orders. 

I thought about using an array to store the order Ticket Numbers of the cloned orders, but this comment functionality seems like it might be simpler and more efficient. 

I can store an identifier, eg "[clone]" in the comment field when i create the order, and then check the the OrderComment value later.  

I have read that some brokers can append information to the comments, or truncate them, but I can code around those issues.  Other than those caveats, is there any reason not to use OrderComment to store such metadata? 

Thanks in advance.

Stanislav Ivanov  
kasinath:

In my EA, there are certain circumstances in which in clone orders, and will have to later identify them as cloned orders. 

I thought about using an array to store the order Ticket Numbers of the cloned orders, but this comment functionality seems like it might be simpler and more efficient. 

I can store an identifier, eg "[clone]" in the comment field when i create the order, and then check the the OrderComment value later.  

I have read that some brokers can append information to the comments, or truncate them, but I can code around those issues.  Other than those caveats, is there any reason not to use OrderComment to store such metadata? 

Thanks in advance.

Hi ,

I sometimes do the same thing where i need to keep orders distinct, yes you can store the info in an array, but this works too.

So far havent come across a negative effect

Best Regards

kasinath  
Stanislav Ivanov:

Hi ,

I sometimes do the same thing where i need to keep orders distinct, yes you can store the info in an array, but this works too.

So far havent come across a negative effect

Best Regards

Thank you for your response Stanislav. 

I will keep an eye on it. If i spot an issues, i will share here. 

Reason: