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 Javierw.ok, Today, 04:12 PM
      0 responses
      4 views
      0 likes
      Last Post Javierw.ok  
      Started by timmbbo, Today, 08:59 AM
      2 responses
      10 views
      0 likes
      Last Post bltdavid  
      Started by alifarahani, Today, 09:40 AM
      6 responses
      40 views
      0 likes
      Last Post alifarahani  
      Started by Waxavi, Today, 02:10 AM
      1 response
      18 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by Kaledus, Today, 01:29 PM
      5 responses
      15 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X