oco order

Created at 19 Jun 2023, 10:18
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
TE

tepusa

Joined 02.06.2023

oco order
19 Jun 2023, 10:18


add please oco order, i place a buy limit and a sell limit over night, if buy limit is activated, then delete the sell limit


cTrader
@tepusa
Replies

jim.tollan
21 Jun 2023, 10:43 ( Updated at: 21 Jun 2023, 11:12 )

RE:

emanuelgornic said:

add please oco order, i place a buy limit and a sell limit over night, if buy limit is activated, then delete the sell limit

coincidently, i just started working on some automation that does exactly this. i place a buy liimt order above the closing price and a sell limit order below the closing price (or based on trading edge of the current move). whichever order is taken, the opposing one gets cancelled. In my scenario, i'm not only focussed on market opening. I'm also focussed on news events and supply and demand zones being broken.

I have to say tho, I do need a little more data on positioning the prices and TP's etc as i'm trying to milk the super fast moves and be out on TP within the 5 minute bar. my backtesting is still in progress and nothing definitive yet. would love to hear your take on this...

In theory, I could adapt this to simply be a kind of manual helper which runs in the background and identifies an OCO set of orders and cancels the unmatched order when the other is matched. that of course would have to work using some premise regards the setup of the two orders (so that other normal orders were left unaffected - using a comment in both orders with the exact same content would work for example as this could be searched in the pending orders collection and cancelled when the promary OCO candidate is matched).

Happy to share a basic algo file (or even the code if preferred) with whatever specifications you feel would work for you.


@jim.tollan