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 targets

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

    Profit targets

    I'm attempting to sell or buy back when certain profit targets are met in my strategy. I'm doing this in quarters or thirds. How do I sell/cover in thirds via my automated strategy when profit targets are met?

    #2
    Hello trader14,
    Thanks for your post.

    To do this you would need to submit a seperate order for each "quarter" or "third" of the position that you wanted to scale out of.

    We have a relevant sample of how to scale out of a position in our help guide at the following link: https://ninjatrader.com/support/help...a_position.htm
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Can I do this within the automated strategy as I build it? Also wanted to know the difference between profit target and total profit target, if you can answer that as well.

      Comment


        #4
        trader14,

        The Profit Target is going to be the profit target for a specific order. 'Total profit target' would be something you tallied up yourself as that is not a NinjaTrader value.

        I am not sure what you mean by "Can I do this within the automated strategy as I build it". You would be able to implement the concept in the above sample in your own strategy to achieve your goal.
        Josh G.NinjaTrader Customer Service

        Comment


          #5
          so under profit target - misc field, in the strategy builder, i've set the "from entry signal" to "first third position" with the price I want it sold at. is that correct? i then do this for each subsequent position?

          Comment


            #6
            trader14,

            That sounds correct to me. I suggest doing some testing on your end to confirm everything works as you expect it to. If you see something you are not expecting let me know and we can go from there.
            Attached Files
            Josh G.NinjaTrader Customer Service

            Comment


              #7
              hi josh, can't get this to work. the positions aren't selling at the targets as they should. what am i doing wrong? i've labeled each contract, 1, 2, 3 for a total of three. I'm going long all three and then setting the targets specifically by name of each contract. not sure what else i need to do.

              Comment


                #8
                Hello trader14,

                We would need to see what you have created so far to better understand what should be happening. Could you provide an image of the conditions you made along with the stop/targets page?

                An alternative would be to compare and contrast against the sample we have of this concept to see if you can pick out differences with the order methods and targets. In the builder you can click the "View Code" button, this will just display the generated NinjaScript code. Looking in the code for "EnterLong" or "SetStopLoss" "SetProfitTarget" you should find the lines which contain the entry/target info. This could be compared against the other script to make observations of differences.


                I look forward to being of further assistance.
                JesseNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by JonesJoker, 04-22-2024, 12:23 PM
                6 responses
                32 views
                0 likes
                Last Post JonesJoker  
                Started by GussJ, 03-04-2020, 03:11 PM
                12 responses
                3,239 views
                0 likes
                Last Post Leafcutter  
                Started by AveryFlynn, Today, 04:57 AM
                0 responses
                5 views
                0 likes
                Last Post AveryFlynn  
                Started by RubenCazorla, 08-30-2022, 06:36 AM
                3 responses
                79 views
                0 likes
                Last Post PaulMohn  
                Started by f.saeidi, Yesterday, 12:14 PM
                9 responses
                25 views
                0 likes
                Last Post f.saeidi  
                Working...
                X