Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Placing Dynamic Stop Order Entries with OCO Brackets

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Placing Dynamic Stop Order Entries with OCO Brackets

    Hello,

    I am wondering if there's a way to place dynamic stop orders (long/short) with OCO brackets attached. I am familiar with the strategy builder enter long / enter short functions, but usually those seem to be used for cases where you're entering at the open of a new candle.

    A very simple example to demonstrate my question:
    Let's say I'm using the Swing indicator, which basically just shows spots on the chart where a new swing point has been created (ie. highest or lowest point in the last x bars in either direction). In this example, I would want the strategy to create a Buy or Sell Stop order as soon as a new swing point is created. If price is consolidating into a wedge, the swing points would be moving closer together over time, so the strategy should be constantly shifting the Buy/Sell Stop Orders, say one tick above or below the most recent swing point. The basic idea is to have an order sitting out there, so that it gets hit at a certain price, rather than entering at the open of a new candle.

    On top of this, how can I specify these orders should be OCO orders, with maybe a single stop loss and profit target for simplicity.

    Thank you
    Last edited by beejinator; 07-29-2022, 11:43 AM.

    #2
    Hello beejinator,

    For entries to be OCO you have to use the unmanaged approach. There is a sample of a strategy with OCO entries here:



    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Segwin, 05-07-2018, 02:15 PM
    14 responses
    1,789 views
    0 likes
    Last Post aligator  
    Started by Jimmyk, 01-26-2018, 05:19 AM
    6 responses
    837 views
    0 likes
    Last Post emuns
    by emuns
     
    Started by jxs_xrj, 01-12-2020, 09:49 AM
    6 responses
    3,293 views
    1 like
    Last Post jgualdronc  
    Started by Touch-Ups, Today, 10:36 AM
    0 responses
    13 views
    0 likes
    Last Post Touch-Ups  
    Started by geddyisodin, 04-25-2024, 05:20 AM
    11 responses
    63 views
    0 likes
    Last Post halgo_boulder  
    Working...
    X