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

OCO + Limit Order

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

    OCO + Limit Order

    Hi

    I want to trade stocks via IB and Ninjatrader 8 and want to automatically attach a stop and a limit order to the order to open a position.

    For example:

    Buy Limit @$100

    Then I want to automatically attach

    Sell Stop Market @$99
    Sell Limit @$103

    The attached orders should be visible before the Buy order is executed, such that I can move them around and adjust to my setup (the latest higher low in a chart for the stop for example). The attached orders should be OCO.

    Thank you for your help!

    Thanks, regards




    #2
    Hi treadstone144, thanks for your question and welcome to the NinjaTrader forum. We are happy to have you here.

    This can be done in two ways in a NinjaScript strategy. The first method is the "manual" method using OnExecutionUpdate and OnOrderUpdate to submit protective orders. With this method, you will not be able to move the stop and target manually:



    The other method would be to use an ATM template within the strategy. We have a sample in the platform called "SampleATMStrategy". We also have a help guide page on the subject here:



    The caveat with using ATM strategies is that they can not be backtested.

    Please let me know if I can assist any further.
    Chris L.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by DayTradingDEMON, Today, 09:28 AM
    3 responses
    19 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Stanfillirenfro, Today, 07:23 AM
    9 responses
    23 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by George21, Today, 10:07 AM
    0 responses
    8 views
    0 likes
    Last Post George21  
    Started by navyguy06, Today, 09:28 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by cmtjoancolmenero, Yesterday, 03:58 PM
    8 responses
    33 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Working...
    X