Any ways to distinguish bracket orders from other orders?

Custom indicators, trading strategies, data export and recording and more...
blk
Posts: 44
Joined: Fri Nov 01, 2019 8:59 pm
Has thanked: 7 times

Any ways to distinguish bracket orders from other orders?

Post by blk » Fri Feb 12, 2021 3:33 am

Hi,

Is there a way to distinguish bracket orders from regular limit/stop orders placed on heatmap/dom columns ? 

I'm wondering if is there any field on the OrderInfoUpdate that we can check.

Thanks,
blk

Svyatoslav
Site Admin
Posts: 278
Joined: Mon Jun 11, 2018 11:44 am
Has thanked: 2 times
Been thanked: 31 times

Re: Any ways to distinguish bracket orders from other orders?

Post by Svyatoslav » Fri Feb 12, 2021 9:03 am

For the ones sent from within bookmap you might be able to use "inject" mode for your addon (core api) and listen for sendOrder calls. You would be able to see SimpleOrderSendParameters#takeProfitClientId and stopLossClientId, which you'd later find in TP/SL orders. However that would only work on some providers that don't assign those ID's automatically (e.g. I don't think we respect those two parameters in Rithmic, but I think we do in CQG).

Reliable way to understand that orders are part of brackets (or an OCO chain) would be nice to have, but it's not in place. You can create a feature request in corresponding topic.

blk
Posts: 44
Joined: Fri Nov 01, 2019 8:59 pm
Has thanked: 7 times

Re: Any ways to distinguish bracket orders from other orders?

Post by blk » Fri Feb 12, 2021 1:45 pm

Thank you for your reply, I think that would be a great feature for any BM addon developer that wants to work with orders.

Regarding the core API, is it possible to use injector with the other Listeners? e.g. Layer1 TradeListener, Depth... 

Svyatoslav
Site Admin
Posts: 278
Joined: Mon Jun 11, 2018 11:44 am
Has thanked: 2 times
Been thanked: 31 times

Re: Any ways to distinguish bracket orders from other orders?

Post by Svyatoslav » Fri Feb 12, 2021 4:13 pm

Yes. But if your goal isn't just listen but to modify the data - you should use Data Editor module instead: https://github.com/BookmapAPI/DemoStrat ... tor-module as normal injected modules can't rewrite upstream events (that will cause weird effects)

Post Reply