How to find the index of open order

 
Hi, i need to find the index of an open order relative to the open of any other candle afterwards and then displaying it in metatrader using comment.
I have tried using orderselect and iBarshift and have only been successful using print but cannot get comment to display the results, please any help or idea will be appreciated.
 
amusco2:
Hi, i need to find the index of an open order relative to the open of any other candle afterwards and then displaying it in metatrader using comment.
I have tried using orderselect and iBarshift and have only been successful using print but cannot get comment to display the results, please any help or idea will be appreciated.


If you can get it to print, then you should be able to show it as the comment

Are you setting comment to "" somewhere later in the code?

 
amusco2:
Hi, i need to find the index of an open order relative to the open of any other candle afterwards and then displaying it in metatrader using comment.
I have tried using orderselect and iBarshift and have only been successful using print but cannot get comment to display the results, please any help or idea will be appreciated.

Replace Print( with Comment(