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 kulwinder73, Today, 10:31 AM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by RookieTrader, Today, 09:37 AM
      3 responses
      15 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by terofs, Yesterday, 04:18 PM
      1 response
      24 views
      0 likes
      Last Post terofs
      by terofs
       
      Started by CommonWhale, Today, 09:55 AM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by Gerik, Today, 09:40 AM
      2 responses
      8 views
      0 likes
      Last Post Gerik
      by Gerik
       
      Working...
      X