Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Showing values of visible day

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

    Showing values of visible day

    Hi,
    I am trying to have an indicator to display certain values pertaining to the visible chart. I have hacked something to have the values show as I scroll forward in time using this snippet from 'CurrentDayOHL':
    Code:
    currentDate != Bars.GetTradingDayFromLocal(Time[0])
    but it does not update values as you scroll back in time to past days. What would I need to do to make the indicator 'update' values relevant to the visible day?

    K

    #2
    Hello K,

    Sorry, not quite following what you're looking to do. What values do you want updated on prior days?
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hi Ryan,
      I like to keep a something similar to the Data Box as a message top of the chart, with info such as mid of range, daily range, IB range. So when I scroll back or forward in intradays, the values need to update to the visible chart. At present the values stay fixed based on the values of the last trading day.

      K

      Comment


        #4
        Hello K,

        Unfortunately we're not able to offer much support for working with visible chart area. I can see what you're saying when using DrawTextFixed(). It uses the last value rather than an historic one when scrolling back. You may consider using DrawText() only, and placing text relative to bars. A good property that can help reset values on a daily basis is FirstBarOfSession.

        An alternative to this is overriding the plot method and you then draw directly on chart. We can point you to the provided sample but any implementation will be on your own. This CustomPlotSample is available in all NT installations through Tools > edit NinjaScript > Indicator.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Ryan,
          Appreciate the guidance. You are right on the usage of the DrawText, and I was thinking of overloading the plot method to get what I want. I believe I have enough info to 'hack' something to my liking.

          Cheers,
          K

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          580 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          335 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          102 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          554 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          552 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X