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

Strategy placed orders set LMT as exits. How to change to MKT?

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

    Strategy placed orders set LMT as exits. How to change to MKT?

    When I make a strategy do an automated long order, it sets the profit target stop to a LMT order. Is there a way to make it a market order exit?
    Click image for larger version

Name:	lmt-to-mkt.png
Views:	182
Size:	10.3 KB
ID:	1149330

    #2
    Hello MatthewLesko,

    Thank you for your post.

    If you would like to have your strategy submit a Market-If-Touched (MIT) order as seen in the screenshot provided, you could call EnterLongMIT() instead of EnterLong(). EnterLongMIT() generates a buy MIT order to enter a long position. If you are using the Strategy Builder, you would select 'Enter long position by a market-if-touched order' in the Order Management folder when creating an Action.

    See the help guide documentation below for more information.
    EnterLongMIT() - https://ninjatrader.com/support/help...terlongmit.htm

    Let us know if we may assist further.
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_BrandonH View Post
      Hello MatthewLesko,

      Thank you for your post.

      If you would like to have your strategy submit a Market-If-Touched (MIT) order as seen in the screenshot provided, you could call EnterLongMIT() instead of EnterLong(). EnterLongMIT() generates a buy MIT order to enter a long position. If you are using the Strategy Builder, you would select 'Enter long position by a market-if-touched order' in the Order Management folder when creating an Action.

      See the help guide documentation below for more information.
      EnterLongMIT() - https://ninjatrader.com/support/help...terlongmit.htm

      Let us know if we may assist further.
      Is that for entering the trade or exiting?
      I think it's "SetProfitTarget" under Stops and Actions of strategy that I'm wanting to be a MIT not a LMT

      Comment


        #4
        Hello MatthewLesko,

        Thank you for your note.

        EnterLongMIT() would be used to enter a long position. To exit a long position with an MIT order, you would need to use ExitLongMIT().

        If you would like to make SetProfitTarget() an MIT order instead of a Limit order, you would need to unlock your code from the Strategy Builder using the 'Unlock code' button and use the following syntax for SetProfitTarget(). This syntax for SetProfitTarget() allows you to specify a bool to determine if SetProfitTarget() is a MIT order. Setting the isMIT bool to true means that SetProfitTarget() would place an MIT order.

        SetProfitTarget(string fromEntrySignal, CalculationMode mode, double value, bool isMIT)

        See the help guide documentation below for more information about Managed Approach order methods and SetProfitTarget().
        Managed Approach Order methods - https://ninjatrader.com/support/help...d_approach.htm
        SetProfitTarget() - https://ninjatrader.com/support/help...ofittarget.htm

        Let us know if we may assist further.
        Brandon H.NinjaTrader Customer Service

        Comment


          #5
          Ah, awesome - thanks I will test it out

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by ghoul, Today, 06:02 PM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by jeronymite, 04-12-2024, 04:26 PM
          3 responses
          44 views
          0 likes
          Last Post jeronymite  
          Started by Barry Milan, Yesterday, 10:35 PM
          7 responses
          20 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by AttiM, 02-14-2024, 05:20 PM
          10 responses
          179 views
          0 likes
          Last Post jeronymite  
          Started by DanielSanMartin, Yesterday, 02:37 PM
          2 responses
          13 views
          0 likes
          Last Post DanielSanMartin  
          Working...
          X