Announcement

Collapse
No announcement yet.

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.

    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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        83 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        45 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        65 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        68 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        57 views
        0 likes
        Last Post CarlTrading  
        Working...
        X