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 judysamnt7, 03-13-2023, 09:11 AM
        4 responses
        59 views
        0 likes
        Last Post DynamicTest  
        Started by ScottWalsh, Today, 06:52 PM
        4 responses
        36 views
        0 likes
        Last Post ScottWalsh  
        Started by olisav57, Today, 07:39 PM
        0 responses
        7 views
        0 likes
        Last Post olisav57  
        Started by trilliantrader, Today, 03:01 PM
        2 responses
        21 views
        0 likes
        Last Post helpwanted  
        Started by cre8able, Today, 07:24 PM
        0 responses
        10 views
        0 likes
        Last Post cre8able  
        Working...
        X