Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to combine Exit orders with TakeTrofit

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

    How to combine Exit orders with TakeTrofit

    Hello, I have an idea to exit position with ExitStopLimit, for example

    Code:
    EnterLong("Basic Entry");
    ExitLongStopLimit(stopPrice - (1 * TickSize), stopPrice, "Exit Stop Limit", "Basic Entry");
    It works ok, but now I'm trying to set take profit exit.
    I tried standard approach with TakeProft, like this

    Code:
    SetProfitTarget("Basic Entry",CalculationMode.Ticks,takeProftLevel);
    but it says it is impossible (see internal order handling rules). Is there any possible way to set take profit order?

    #2
    Hello rfsettling,

    If you would like to set both a profit target and stop loss you should use, SetProfitTarget and SetStopLoss methods together, which would be tied together with an OCO.

    See SetStopLoss section of our helpguide,

    You cannot use SetProfitTarget and ExitLongStopLimit, and the reason why is explained at the following link under, Internal Order Handling Rules that Reduce Unwanted Positions,

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      I understand that I cannot use standard SetProfitTarget, it was clear from the very start. My question is not about SetProfitTarget, but about any other way to reach the same result

      Comment


        #4
        Hello rfsettling,

        Once the buy entry is filled, in OnExecution place an ExitLongLimit() order above the bid price for the profit target and ExitLongStopLimit() (or ExitLongStopMarket) order below the bid price for the stop loss. For both, use the fromEntrySignal of the entry order.

        ExitLongLimit - http://ninjatrader.com/support/helpG...tlonglimit.htm
        ExitLongStopLimit - http://ninjatrader.com/support/helpG...gstoplimit.htm
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thanks a lot. It works

          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