How to Properly Implement Broker-Side Bracket Orders (OCO Stop + Target) in Custom Strategy

Ozzyparkinson

New member
Joined
Feb 13, 2026
Posts
1
Likes
0
Hi all,

I currently have AI developing a custom strategy in the MotiveWave SDK (Java), and I’m looking to transition from virtual backtest stop/target logic to proper live broker-side bracket orders.

At the moment:
  • Entry orders are submitted using:
    oc.buy(qty);
    oc.sell(qty);
  • Stops and targets are managed virtually using bar High/Low logic.
  • This works correctly for back testing, however for live trading i would like to submit a market bracket order (SL/TP). Ensuring they are linked as OCO, having the broker manage the execution.
What is the correct SDK method for creating true bracket orders? Should AI be using:
  • createStopOrder()
  • createLimitOrder()
  • Or a specific bracket/OCO API?
How is OCO grouping properly defined in the SDK?
Is there an example of a minimal working bracket order implementation?
 
Top