Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What does this error mean ?

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

    What does this error mean ?

    Hi ninjas,

    I've been doing certain backtest and all running ok, but weirdly whenever I try to go to recent days, NT gives me this error:

    Error on calling 'OnBarUpdate' method for strategy ' ( any xxxxxx indentifier )': Function does not accept floating point Not-a-Number values.

    I know it's difficult for you to spot it exactly, but at least could you give me some hint where to find the bug? because it's hard to see this strategy running fine in other dates. It seems to have with BarInProgress, not sure though

    Thanks in advance

    #2
    Hi pstrusi,

    The best way to find it is to start adding prints to your code.

    I like to print the bar time and a number so i can recognize the prints.

    Basically i just look for the last print before the error and try and get it closer and closer.

    Print("1 "+Time[0]);

    The issue looks to be coming from a method call that is being supplied a value that is NaN.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea, thanks for your answer but I've just "solved" using a Math.Round for a floating point calculations and it seems to work well now.

      If I had any further problems and not be able to know, I'll put it here as headache :-)

      Regards

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by sjsj2732, Yesterday, 04:31 AM
      0 responses
      36 views
      0 likes
      Last Post sjsj2732  
      Started by NullPointStrategies, 03-13-2026, 05:17 AM
      0 responses
      287 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      288 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      134 views
      1 like
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      95 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Working...
      X