Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator Y-Axis visible range of values not useful

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

    Indicator Y-Axis visible range of values not useful

    Hi all,

    I have an indicator which can take values between 0 and 100 though most often the values are less than 1. If the value is >1 then the value is not shown on the indicator pane as the range of values shown is 0-1 in increments of 0.2. If the value is <1 the axis seems to zoom in on the value and show no other values on the axis. By this I mean if the value shown is 0.63, I won't see 0.6 or 0.5 above or below respectively as they will be far away at the current axis magnification. This indicator uses calls to the built-in ATR indicator for input. What do I need to do to make sure the Y-axis range is reasonable (show a range of values nearby) and always include the current indicator value?

    Thanks,
    darmbk.

    #2
    Hello darmbk,

    Thank you for your post.

    Can you please provide a screenshot of what you are seeing on the chart?
    To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file. Click Reply -> Go Advanced -> Select the Paperclip icon on the toolbar

    For detailed instructions please visit the following link

    http://take-a-screenshot.org/


    Additionally, would you be willing to share your script so that I can investigate this further?
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Hi Cal,

      I have found that the issue is related to Min Bars Required as I am using daily indicators on a 1 min chart.

      During the first number of days of data, while there are no daily indicators displaying values (where I was stating that I saw just an axis of values from 0-1), when I print output to a file during these dates, my bespoke indicators report values that are not shown in the chart, perhaps creating averaged data simply from what data is available ignoring that for instance a 14 day indicator has fewer than 14 days data to calculate a value. Would this be correct? So for example, if I use a 14 day MA on a 1 min chart but only have 10 days of data, will the chart show blank but if I print out the same 14 day MA values the indicator will calculate it based on the days of data available even if this is less than 14 days?

      So I understand the Y-Axis issue now. I will need to investigate this starting bars issue before I open a forum post on it.

      Thanks,
      darmbk.

      Comment


        #4
        darmbk,

        Essentially yes, this is correct.
        One thing to note is that you can change the BarsRequired to a lower value, BarsRequired = 1; in the Initialize().

        Additionally, you can run a current bar check against the period to ensure the script has enough data before calculating.

        Example -
        if(CurrentBar < Period) return;

        This tells the script to only start running the rest of the code after the current bar has passed the value of Period.

        Let me know if I can be of further assistance.
        Cal H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        32 views
        0 likes
        Last Post SalmaTrader  
        Started by CarlTrading, 07-05-2026, 01:16 PM
        0 responses
        20 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 06-17-2026, 10:32 AM
        0 responses
        12 views
        0 likes
        Last Post CaptainJack  
        Started by kinfxhk, 06-17-2026, 04:15 AM
        0 responses
        18 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 06-17-2026, 04:06 AM
        0 responses
        20 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X