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

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 techgetgame, Today, 11:42 PM
          0 responses
          7 views
          0 likes
          Last Post techgetgame  
          Started by sephichapdson, Today, 11:36 PM
          0 responses
          1 view
          0 likes
          Last Post sephichapdson  
          Started by bortz, 11-06-2023, 08:04 AM
          47 responses
          1,612 views
          0 likes
          Last Post aligator  
          Started by jaybedreamin, Today, 05:56 PM
          0 responses
          9 views
          0 likes
          Last Post jaybedreamin  
          Started by DJ888, 04-16-2024, 06:09 PM
          6 responses
          19 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Working...
          X