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

Order Type

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

    Order Type

    I'm not clear on how to set the order types for unmanaged orders.

    1. If I want to buy at the market I'll submit an order with the orderaction.buy and ordertype.market. What do I need for simple stop and limit orders for fixed prices?

    2. If I want to sell at the market I'll submit an order with the orderaction.see and ordertype.market. What do I need for simple stop and limit orders for fixed prices?

    Thanks!!

    #2
    Hello
    Thanks for your post.

    For a limit or stopLimit you will specify the OrderType as OrderType.Limit or OrderType.StopLimit

    You would then need to add the limit price or the limit price and the stop price depending on the order type of limit or stoplimit. The helpguide shows the variation to include the limit price and stop limit price.

    Please see the helpguide here on SubmitOrderUnmanaged(): http://ninjatrader.com/support/helpG...runmanaged.htm

    Limit example:

    SubmitOrderUnmanaged(0, OrderAction.Buy, OrderType.Limit, 1, 2475.25, 0, "", "Enter Long"); In this example it is a buy limit with a price of 2475.25. A quantity of 1. As this is not a stop limit a 0 (zero) is entered for the stop price. As there is no OCO associated the OCO string is empty "". The signal name is "EnterLong". This example matches the last signature shown for the method in the helpguide. SubmitOrderUnmanaged(int selectedBarsInProgress, OrderAction orderAction, OrderType orderType, int quantity, double limitPrice, double stopPrice, string oco, string signalName)
    Paul H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by geddyisodin, 04-25-2024, 05:20 AM
    8 responses
    60 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by jxs_xrj, 01-12-2020, 09:49 AM
    4 responses
    3,287 views
    1 like
    Last Post jgualdronc  
    Started by Option Whisperer, Today, 09:55 AM
    0 responses
    5 views
    0 likes
    Last Post Option Whisperer  
    Started by halgo_boulder, 04-20-2024, 08:44 AM
    2 responses
    22 views
    0 likes
    Last Post halgo_boulder  
    Started by mishhh, 05-25-2010, 08:54 AM
    19 responses
    6,189 views
    0 likes
    Last Post rene69851  
    Working...
    X