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

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 frslvr, 04-11-2024, 07:26 AM
        8 responses
        111 views
        1 like
        Last Post NinjaTrader_BrandonH  
        Started by stafe, 04-15-2024, 08:34 PM
        10 responses
        42 views
        0 likes
        Last Post stafe
        by stafe
         
        Started by rocketman7, Today, 09:41 AM
        3 responses
        8 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by traderqz, Today, 09:44 AM
        2 responses
        5 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by rocketman7, Today, 02:12 AM
        7 responses
        31 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X