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

TS2Ki: Floating point invalid numbers in calculation


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

PureBytes Links

Trading Reference Links

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