[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

TS2Ki: Floating point invalid numbers in calculation


  • Date: Thu, 17 Dec 2009 10:54:47 -0600
  • From: "Samuel K. Tennis" <sktennis@xxxxxxxxxxxxxxxxxx>
  • Subject: TS2Ki: Floating point invalid numbers in calculation

PureBytes Links

Trading Reference Links

Alex,
        My suggestions would be

        1)  Try on completely different data

2) After a fresh reboot, and without opening any thing from the last session, create a new workspace, open the code, copy those lines and paste into a new Signal. Create a new Strategy, new chart and test again.

Those are sort of the standard debugging steps I follow when it puzzles me. The rebooting is probably the most critical! That and the new workspace.

Sam

Date: Wed, 16 Dec 2009 22:39:30 -0800 (PST)
From: alex@xxxxxxxxxxxxxx
To: omega-list@xxxxxxxxxx
Subject: TS2Ki: Floating point invalid numbers in calculation

I'm getting this inexplicable error. I add a strategy to my chart in TS2000i. The strategy contains 1 signal that doesn't do anything except initialize some variables and print some dates to the debug window. And yet, it generates an error "Floating point invalid numbers in calculation".

What's going on here?

Here's my signal:
=========================================
Inputs:
        peakspan(2),
        maxoverlap(0.25),
        maxlookback(60),
        TF2bars(0),
        TF3bars(0);

Arrays:
        TFbars[3](1);

Variables:
        tf(0), i(0), tlref(0), foundpeak(0), TLstart(0), TLend(0);

if CurrentBar <= 1 then begin
        TFbars[0] = 1;
        TFbars[1] = TF2bars;
        TFbars[2] = TF3bars;
        ClearDebug;
end;
for tf = 0 to 2 begin
        if TFbars[tf] > 0 then begin
                print("begin ",date);
                print("end  ",date);
        end;
end;
========================================

It used to be a lot bigger, but the above is what I end up with after commenting everything else out. I don't understand where the error is coming from.

Anyone else ever seen this?
-Alex


Samuel K. Tennis
Vista-Research                        voice: 1(850) 243-5105
129 Staff Drive, NE                    cell: 1(850) 582-7342
Ft. Walton Beach, FL  32548             fax: 1(510) 743-8274
<SKTennis@xxxxxxxxxxxxxxxxxx> <http://www.vista-research.com>

        ***** EasyLanguage Spoken Here *****