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

Setting up Price Targets

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

    Setting up Price Targets

    Hello,

    Interested in setting up some price targets for entry and exit. Is there a way to do this with the strategy builder? I cannot figure it out.

    Thanks

    #2
    Not sure I follow. Please make sure you read the relevant sections on the strategy wizard on the help guide. There also is a video tutorial.

    Comment


      #3
      Example, when a price hit's a certain price I would like to go short/long. I cannot figure out how to use the current price as the trigger for making trades. I have looked in the help section as well with no avail. Thanks

      Comment


        #5
        Thanks. A specific example would be when the price closes above 2.0000 or when the prices closes below 1.5000.

        Rather than just a higher or lower close, specific price points.

        Comment


          #6
          See my 2nd link below for how to apply specific prices.

          Comment


            #7
            On the left hand side you choose the Close series then in the middle choose greater than then on the right hand side choose Numeric value and type in 2.000 or whatever you want.
            Josh P.NinjaTrader Customer Service

            Comment


              #8
              Rather than start a new thread on this topic, I thought I would post my question here.

              I'm trading multiple lots in a mini forex acct and while my strategy works well, I'd like to try and 'bank' smaller moves, but still maintain the overall position.

              I'm using the following code, but it doesn't seem to have any effect on the strategy results (takeProfit is an integer of the profit target in pips i.e. 25):
              Code:
                              // Condition set 9
                              if (Position.MarketPosition == MarketPosition.Short
                                  && Position.GetProfitLoss(Close[0], PerformanceUnit.Points) == takeProfit)
                              {
                                  ExitShort("Take Profit", "");
                                  EnterShort(DefaultQuantity, "Re-enter short");
                              }
                  
                              // Condition set 10
                              if (Position.MarketPosition == MarketPosition.Long
                                  && Position.GetProfitLoss(Close[0], PerformanceUnit.Points) == takeProfit)
                              {
                                  ExitLong("Take Profit", "");
                                  EnterLong(DefaultQuantity, "Re-enter long");
                              }
              Any ideas?

              Comment


                #9
                Guessing: could be a rounding issue on
                Code:
                Position.GetProfitLoss(Close[0], PerformanceUnit.Points) == takeProfit
                I suggest adding Print() statement to see if your conditions are met as expected. If that works you could use TraceOrders to see what happens to your orders.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Skifree, Yesterday, 11:38 PM
                1 response
                14 views
                0 likes
                Last Post NinjaTrader_LuisH  
                Started by Mathias79, Today, 10:38 AM
                6 responses
                18 views
                0 likes
                Last Post NinjaTrader_Clayton  
                Started by eladlevi, Today, 11:02 AM
                1 response
                5 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by Skifree, Yesterday, 11:41 PM
                2 responses
                13 views
                1 like
                Last Post eDanny
                by eDanny
                 
                Started by TraderCro, 04-12-2024, 11:36 AM
                8 responses
                105 views
                0 likes
                Last Post NinjaTrader_ChristopherJ  
                Working...
                X