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

NeuN

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

    NeuN

    Hi all!

    I'm getting some errors

    "Error on setting indicator plot for indicator 'XXXIndicator'. Value outside of valid range."

    Trying to debug it, I inserted some Print statements and show:
    Code:
    0   NeuN
    1   NeuN
    2   NeuN
    3   NeuN
    4   NeuN
    5   NeuN
    6   NeuN
    7   NeuN
    8   NeuN
    9   NeuN
    10   NeuN
    The first number is CurrentBar. What it means NeuN? I don't have values for the variable until bar 72.

    Thanks in advance,

    Sergio

    #2
    Hello sercava,

    I would be happy to look into what is happening here.

    What is the exact code you are putting in the print? I see that you have CurrentBar in there, is there anything else in the print statement like a variable?

    Its hard to say exactly where the error is coming from using what you have provided. If you would like to post the section of code where you think the error is coming from or the whole code I could take a look.

    The "Value outside of valid range" message would be regarding something you are trying to access that is not yet created possibly.

    Generally messages like this happen when you are trying to look back X amount of bars but that amount of bars has not been loaded yet.

    Please let me know and I will be happy to help.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Searching around I have solved it using ContainsValue(). I was accessing an indicator with no values yet.

      Thanks for quick answer,

      Sergio

      Comment


        #4
        Originally posted by sercava View Post
        Hi all!

        I'm getting some errors

        "Error on setting indicator plot for indicator 'XXXIndicator'. Value outside of valid range."

        Trying to debug it, I inserted some Print statements and show:
        Code:
        0   NeuN
        1   NeuN
        2   NeuN
        3   NeuN
        4   NeuN
        5   NeuN
        6   NeuN
        7   NeuN
        8   NeuN
        9   NeuN
        10   NeuN
        The first number is CurrentBar. What it means NeuN? I don't have values for the variable until bar 72.

        Thanks in advance,

        Sergio
        I do not read Spanish, but it looks suspiciously like the equivalent of the English NaN, which means "Not a Number". It usually results from dividing by zero. Take care of your calculation that potentially divides by zero: apparently this time it is doing so.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cls71, Today, 04:45 AM
        0 responses
        1 view
        0 likes
        Last Post cls71
        by cls71
         
        Started by mjairg, 07-20-2023, 11:57 PM
        3 responses
        213 views
        1 like
        Last Post PaulMohn  
        Started by TheWhiteDragon, 01-21-2019, 12:44 PM
        4 responses
        544 views
        0 likes
        Last Post PaulMohn  
        Started by GLFX005, Today, 03:23 AM
        0 responses
        3 views
        0 likes
        Last Post GLFX005
        by GLFX005
         
        Started by XXtrader, Yesterday, 11:30 PM
        2 responses
        12 views
        0 likes
        Last Post XXtrader  
        Working...
        X