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.Quantity

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

    #16
    Is it possible to plot the current position size held? I've tried AddPlot() using the Position.Quantity, but have not been able to find the proper sequence.

    Comment


      #17
      Hello scottd77,

      Thank you for your post and welcome to the NinjaTrader Support Forum!

      Originally posted by scottd77 View Post
      Is it possible to plot the current position size held? I've tried AddPlot() using the Position.Quantity, but have not been able to find the proper sequence.
      Are you looking to do this in NinjaTrader 7 or 8? Are you looking for a specific strategy's position or the account position?

      I look forward to your response.

      Comment


        #18
        Sorry should have been more specific. I"m using NT8 and I'm looking for a specific strategy position.

        Comment


          #19
          Hello scottd77,

          Thank you for your response.

          Attached is an example of plotting the Unrealized PnL from within a strategy.
          Attached Files

          Comment


            #20
            Thanks Patrick. I've taken the code example and played around with it a bit to try and get the total number of contracts i'm net short/long for the strategy, While i now can get a plot line, it's just a zero horizontal line and it doesn't pickup when i see in simulation where the strategy has bought or sold a contract.

            Comment


              #21
              Hello scottd77,

              Thank you for your response.

              Can you attach your strategy to your response so we may investigate further?
              If you prefer you can send it to platformsupport[at]ninjatrader[dot]com with 'ATTN: Patrick H - 1506626' in the subject line.

              Strategy file will be under Documents\NinjaTrader 8\bin\Custom\Strategies on your PC.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by michi08, 10-05-2018, 09:31 AM
              2 responses
              737 views
              0 likes
              Last Post Denver_Wayne  
              Started by sightcareclickhere, Today, 01:55 PM
              0 responses
              1 view
              0 likes
              Last Post sightcareclickhere  
              Started by Mindset, 05-06-2023, 09:03 PM
              9 responses
              258 views
              0 likes
              Last Post ender_wiggum  
              Started by Mizzouman1, Today, 07:35 AM
              4 responses
              18 views
              0 likes
              Last Post Mizzouman1  
              Started by philmg, Today, 01:17 PM
              1 response
              8 views
              0 likes
              Last Post NinjaTrader_ChristopherJ  
              Working...
              X