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

Cannot set Limit and Stop Prices for unmanaged order submitted

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

    Cannot set Limit and Stop Prices for unmanaged order submitted

    Hello,

    In NT7, for some reason i am not being able to set the limit and stop price for unmanaged orders. I have the following scripts and the order is entered successfully. However the Limit and Stop prices of the order show as zero. Can anyone help me determine why? I couldn't find the answer anywhere in this forum.

    Thank you!

    Under Initialize()...
    Unmanaged = true;

    Under OnBarUpdate()...
    entry1 = SubmitOrder(0, OrderAction.Buy, OrderType.Market, 1, 47.90, 42.90, "", en);

    Output window...
    Order='221b6a2b2b9d48df96da3c525999665c/Replay101' Name='Entry 1' State=Filled Instrument='CL 09-17' Action=Buy Limit price=0 Stop price=0 Quantity=1 Strategy='Auto Entry V1.0' Type=Market Tif=Gtc Oco='' Filled=1 Fill price=46.24 Token='221b6a2b2b9d48df96da3c525999665c' Gtd='12/1/2099 12:00:00 AM'

    #2
    Hello caiobran,

    Market orders cannot have a stop or limit price so these are not used.

    If you want to set both the stop and the limit, then you need a StopLimit as the order type.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Wow, that was an easy fix. Thank you!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by GLFX005, Today, 03:23 AM
      0 responses
      2 views
      0 likes
      Last Post GLFX005
      by GLFX005
       
      Started by XXtrader, Yesterday, 11:30 PM
      2 responses
      11 views
      0 likes
      Last Post XXtrader  
      Started by Waxavi, Today, 02:10 AM
      0 responses
      6 views
      0 likes
      Last Post Waxavi
      by Waxavi
       
      Started by TradeForge, Today, 02:09 AM
      0 responses
      14 views
      0 likes
      Last Post TradeForge  
      Started by Waxavi, Today, 02:00 AM
      0 responses
      3 views
      0 likes
      Last Post Waxavi
      by Waxavi
       
      Working...
      X