Hi all,

Am wondering how to “post date” a submitted market order and cancel multiple orders when one order executes.

I am using a “fire it and forget it” logical method, so all exit orders are submitted immediately after the entry fill response.

Is there a way to submit a :"post dated" MarketOnClose order to the broker where it will sit on the books ,and won't actually execute, until a specified number of resolution bars (time) has passed?

This isn't built yet, but here is what I want to do…….

MarketOnOpen gets sent/filled

get response fill ticket and calculate target price, stop price,, and time stop date/time

submit OCO Limit Target Order, OCO Market Stop Order and OCO TimeStop Market Order, to exit, where each order will need to cancel the two other orders if hit.

Not sure how to set this up so the unexecuted orders cancel when one hits.

A Stop Limit entry order that cancels the time stop order and the time stop order is OCO to cancel the entry Stop Limit order ??

To calculate the date/time of the time stop, I use “MaxHold”, to indicate how many bars the position will hold, before it executes a MarketOnClose to exit the position if the target or stop don't trigger within the MaxHold number of bars.

I count bars, rather than track time,  so I can easily opti for different circumstances in all resolutions.

This means the TimeStop market order is “post dated” to execute at a defined point in time              (now + MaxHold bars)…….like it's sitting in que at the broker.

Any help appreciated.

 

Cheers!

~Cary

Author