Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error on bar -1 ??

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

    Error on bar -1 ??

    Hey guys,

    Sometimes I get this error in the log : Error on calling "OnCalculateMinMax" method on bar -1 : the calculation results in unrenderable values.

    How is it possible to have an error on bar -1 if I start the calculation from the Bar 50 (with if CurrentBar>50) ?

    Thanks !

    #2
    Hello After,

    Thanks for your post.

    It may be that you are calculating an index position and the index is getting set to -1. To start debugging, you can add print statements to your code to narrow down where the coding issue is.

    Comment


      #3
      Thanks for answering Paul,

      "It may be that you are calculating an index position and the index is getting set to -1"

      What do you mean by "index position" ? Could you show me an example ?

      Thanks !

      Comment


        #4
        Hello After,

        Thanks for your reply.

        An example maybe where you are looking for a High 51 bars ago High[CurrentBar - 51].

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by kinfxhk, 07-13-2026, 10:18 AM
        0 responses
        26 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 09:50 AM
        0 responses
        16 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 07:21 AM
        0 responses
        22 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-11-2026, 02:11 AM
        0 responses
        21 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        136 views
        0 likes
        Last Post SalmaTrader  
        Working...
        X