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

How to plot indicator for just the current bar

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

    How to plot indicator for just the current bar

    Hi,

    I've created a very simple indicator that plots a dot x ticks below the current price (and x, 3x and 5x ticks above the current price).

    How can I make it plot only for the current bar?

    Thank you,

    Jorge
    Attached Files

    #2
    Jorge,

    When you call DrawDot() don't give them unique names every bar. Remove the + CurrentBar addition to the string ID.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      Jorge,

      When you call DrawDot() don't give them unique names every bar. Remove the + CurrentBar addition to the string ID.
      Hi Josh, thank you for your prompt answer. However, I don't use the DrawDot() method, I simply use Plot.Set(Close[0]-variable), any other idea, or could you please elaborate?

      Thank you,

      Jorge

      Comment


        #4
        If you are using a Plot for sure it will show up for every single bar. Plots have values for each bar. What you want to do is use DrawDot() if you only want to see the last one.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          OK, Josh, thank you

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by alifarahani, Today, 09:40 AM
          3 responses
          15 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by RookieTrader, Today, 09:37 AM
          4 responses
          17 views
          0 likes
          Last Post RookieTrader  
          Started by PaulMohn, Today, 12:36 PM
          0 responses
          5 views
          0 likes
          Last Post PaulMohn  
          Started by love2code2trade, 04-17-2024, 01:45 PM
          4 responses
          40 views
          0 likes
          Last Post love2code2trade  
          Started by junkone, Today, 11:37 AM
          3 responses
          23 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X