Hello
I'm sending a stop order to IB. If price reach my target, then execute. On IB site, I read that I could use "Good til date / time"
I want my order to be good only for the duration of the actual bar. I want it to be canceled if not executed by the end of the bar.
Can I code to send the order using Good Til Date/time. All I would need it to calculate to send the ending time of the actual bar.
Martin
Coding for order to be Good til date/time with IB
- Stan Bokov
- Posts: 963
- Joined: 18 Dec 2009
- Has thanked: 367 times
- Been thanked: 302 times
Re: Coding for order to be Good til date/time with IB
If you would like to make the order active only for this bar and cancelled on the next bar - in your script don't send the order on the next bar. Basically, implement a flag and if the order was sent, don't send it again.
That is the only way how it can be implemented from the MultiCharts side. Time in Force affects the orders from the broker side and it doesn't regulate the condition of sending orders in the MultiCharts.
That is the only way how it can be implemented from the MultiCharts side. Time in Force affects the orders from the broker side and it doesn't regulate the condition of sending orders in the MultiCharts.