Announcement

Collapse
No announcement yet.

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)

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    62 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    134 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X