Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Missing VOL bars in chart at the head and tail

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

    Missing VOL bars in chart at the head and tail

    Hello, there are a couple of problems I don't understand about chart indicators. To reproduce the problem, create a new chart (say daily AMAT for 365 days from OpenTick like I did):

    1. When I add the VOL indicator, the first 20 bars or so are missing from the beginning. And for that matter, other indicators, such as ATR, ADL also miss the first same number of bars. How is it possible that the price chart shows OCHL but for that bar to have no volume? Please see the attached screenshot.

    2. Even though not shown in the attached screenshot, the last bar is also missing from the indicator(s).

    This problem seems to be data source independent (also tried Yahoo and Simulated), and instrument independent (tried Currency, Index), and bar period independent (tried 5 minutes, 30 minutes, 1 day).

    Any hint?
    Attached Files

    #2
    Indicators are displayed once enough data is in the chart to accurately calculate their values. You can override this by setting the property in "Chart Properties" (double click in the chart canvas) "Show unstable period for indicators" to a value of true.
    RayNinjaTrader Customer Service

    Comment


      #3
      Thanks for the quick reply Ray. "Show unstable period for indicators" you suggested fixed the problem. But I don't understand why your own VOL indicator would have an "unstable period" to begin with. As a stateless indicator (one that does not depend on previous levels) VOL should have no unstable period.

      Upon some investigation, the reason for the missing bars seems to be that VOL doesn't seem to be available for the non-trading days (e.g. weekends), and NT puts the datapoints on the non-trading days. That is, the placement of the datapoint is the root cause of the problem.

      This brings up another question for me: how do I plot skipping the non-trading time?

      Comment


        #4
        If you're writing your own indicator (or modifying one whose source has been provided), you can change the number of bars involved by setting the value of BarsRequired in the Initialize() method.

        I suspect this BarsRequired variable may have a default value of 20.

        Comment


          #5
          Thank you sir, you were right on the money!
          I wonder why the VOL indicator shipped with NT doesn't override BarsRequired to be 0, but I now understand what is going on.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Segwin, 05-07-2018, 02:15 PM
          10 responses
          1,768 views
          0 likes
          Last Post Leafcutter  
          Started by Rapine Heihei, 04-23-2024, 07:51 PM
          2 responses
          30 views
          0 likes
          Last Post Max238
          by Max238
           
          Started by Shansen, 08-30-2019, 10:18 PM
          24 responses
          943 views
          0 likes
          Last Post spwizard  
          Started by Max238, Today, 01:28 AM
          0 responses
          9 views
          0 likes
          Last Post Max238
          by Max238
           
          Started by rocketman7, Today, 01:00 AM
          0 responses
          7 views
          0 likes
          Last Post rocketman7  
          Working...
          X