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

Position Average Price Per Signal

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

    Position Average Price Per Signal

    Hi All,

    I have 2 signals for entries, Long and Short. How can I get Position Average Price Per Signal for a strategy? The Position.AveragePrice give value for all trades regardless of signal, whats the code for each of my signals? Anyone can help?

    Thanks,
    Sean

    #2
    Hello shahabjet1,

    Thanks for your post.

    The Position.AveragePrice will return the entry price of a single entry when there are no current positions. If you have multiple positions then it will return the average price of the active positions.

    The actual entry price for each position would be viewable in the Executions tab of the Ninjatrader control center.

    Here is a link to an example strategy that demonstrates getting the stop price that a stop order was filled at. You can do something similar for each entry order. https://ninjatrader.com/support/help...and_onexec.htm
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      I would like to get average price for my multiple entries entered as a signal. In other word, need average price for strategy signal entries, not whole account. I have multiple signal entries. Any ideas for the code?

      Comment


        #4
        Hello shahabjet1,

        Thanks for your reply.

        Position.AveragePrice will return the average of your current positions that were created by the strategy and not of the account.

        Example: double myaverageprice = Position.AveragePrice

        Reference: https://ninjatrader.com/support/help...erageprice.htm
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Great now I need that per Signal. Is there a way Position.AveragePrice can get signal name to return average price for strategies signal X positions?

          Comment


            #6
            Hello shahabjet1,

            Thanks for your reply.

            Here is a link to an example strategy that demonstrates getting the stop price that a stop order was filled at. You can do something similar for each entry order. https://ninjatrader.com/support/help...and_onexec.htm
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              Any updates on Average position price per signal?

              Comment


                #8
                Hello shahabjet1,

                Thanks for your reply.

                I note that you have created another topic that seems the same here: https://ninjatrader.com/support/foru...-per-direction

                What update are you expecting/looking for?
                Paul H.NinjaTrader Customer Service

                Comment


                  #9
                  Yes. Please respond in other post, I responded to your response there and need your help.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by kevinenergy, 02-17-2023, 12:42 PM
                  115 responses
                  2,699 views
                  1 like
                  Last Post kevinenergy  
                  Started by prdecast, Today, 06:07 AM
                  1 response
                  4 views
                  0 likes
                  Last Post NinjaTrader_LuisH  
                  Started by Christopher_R, Today, 12:29 AM
                  1 response
                  14 views
                  0 likes
                  Last Post NinjaTrader_LuisH  
                  Started by chartchart, 05-19-2021, 04:14 PM
                  3 responses
                  577 views
                  1 like
                  Last Post NinjaTrader_Gaby  
                  Started by bsbisme, Yesterday, 02:08 PM
                  1 response
                  15 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Working...
                  X