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

profit trigger and profit capture

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

    profit trigger and profit capture

    i'm trying to make my strategy have a profit trigger and profit capture. the profit trigger is the amount of ticks from entry that makes the profit capture (less than the profit trigger). if the price drops to that profit capture great profits are realized. if not, no sweat it goes to the profit target. does using the average position price + 102 ticks make sense as the profit trigger? then the exit long stop order with close + 62 ticks make sense as the profit capture? if i'm trying to have 102 ticks as the profit trigger and 62 ticks as the profit capture.
    Attached Files

    #2
    Hello SteveReiza,

    Thanks for your post.

    You could consider using the Average Position Price + 102 Ticks for your 'profit trigger' if you would like the 'profit trigger' in your script to be 102 ticks above the average entry price of the order.

    The 'profit capture' could be set to the Close price + 62 Ticks if you want to exit the position if the current market price reaches 62 ticks above the current close price.

    I suggest testing your strategy logic and add debugging prints to the script to understand exactly how your strategy's logic is behaving and if it's behavior suits your overall goals.

    Below is a link to a forum post that demonstrates how to use prints to understand behavior.
    https://ninjatrader.com/support/foru...121#post791121
    Brandon H.NinjaTrader Customer Service

    Comment


      #3
      for an exit long position. i have the entry method as average position price + 102 ticks equals ask. and, an exit long on market if touched at 62.

      is that accomplishing if 102 ticks of profit. an exit at 62 ticks of profit persists until touched? and, if it doesn't touch how does that pending order go away?

      can the average position price be accompanied by an entry signal name?
      Attached Files
      Last edited by SteveReiza; 02-12-2024, 04:52 PM.

      Comment


        #4
        Hello SteveReiza,

        Thanks for your notes.

        Your logic would check if the average price of the position + 102 ticks is equal to the current ask price and check if the current market position is long. Then, it would submit an ExitLongMIT() order for the price of 62.

        The ExitLongMIT() order method requires that you pass a price value in for the 'Stop price' parameter. Currently, you are passing in a price of 62. Note that the 'Stop price' parameter is not the number of ticks away from the entry order. An actual price value should be passed into a 'Stop price' parameter.

        To place the Exit order 62 ticks above the entry, you could consider setting the 'Stop price' to the average entry price offset by a set number of ticks.

        Note that since the market price would already be 102 ticks above the entry price, the ExitLongMIT() order would likely automatically fill since it is being submitted below the current market price and the order would try to fill at the price you submit the order to or better.

        See this help guide page for more information about ExitLongMIT(): https://ninjatrader.com/support/help...xitlongmit.htm

        See this help guide page for more information about Order Types: https://ninjatrader.com/support/help...rder_types.htm
        Brandon H.NinjaTrader Customer Service

        Comment


          #5
          thanks for the reply. okay sweet. that clarification helps. i think i'm just going to use the stop limit order for where the profit target is. i'm getting killed on slippage. the profit level is touched then i'm getting a fill 16-20 ticks lower. i can set the limit price for say 1 tick above the profit target say at 103. that would ensure i get an exit without slippage, right?

          Comment


            #6
            Hello SteveReiza,

            Thanks for your notes.

            Yes, you could consider setting a stop limit order one tick above Position.AveragePrice + 102 Ticks, meaning the order would be placed at the price Position.AveragePrice + 103 Ticks.

            However, if you have a profit target order working at Position.AveragePrice + 102 Ticks and that order price is reached and you are submitting an Exit stop limit order for the same position, if the profit target order is filled and the Exit stop limit order is filled, you could end up in an unwanted short position. The profit target order could close the entry position and if the stop limit order also fills at the same time you would end up in a short position.

            We do not recommend using multiple exit orders for the same position as this could lead to unwanted positions occurring.

            Ultimately, you would have to test the strategy to see if it is behaving as expected.
            Brandon H.NinjaTrader Customer Service

            Comment


              #7
              thanks for the reply. alright sweet. yes, for sure. i''ll make sure there isn't a profit order so that doesn't happen. thanks for the heads up on that.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by AaronKoRn, Today, 09:49 PM
              0 responses
              7 views
              0 likes
              Last Post AaronKoRn  
              Started by carnitron, Today, 08:42 PM
              0 responses
              9 views
              0 likes
              Last Post carnitron  
              Started by strategist007, Today, 07:51 PM
              0 responses
              10 views
              0 likes
              Last Post strategist007  
              Started by StockTrader88, 03-06-2021, 08:58 AM
              44 responses
              3,980 views
              3 likes
              Last Post jhudas88  
              Started by rbeckmann05, Today, 06:48 PM
              0 responses
              9 views
              0 likes
              Last Post rbeckmann05  
              Working...
              X