Please provide code to cancel a limit entry order simply 3 minutes after it was initiated, e.g. order sent out at 9:45:33 so it should expire (being cancelled) at 9:48:33. [ OnBarClose = false ].
The issues I am having are:
a) How to simply get the current time in a format to be compared, and how to compare it (if timeNow >= timeStart + 3 minutes).
b) What to use in the OnBarUpdate() loop (where I guess the time comparing should be placed) to see that this order is still pending.
Thank you!
Comment