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

No "divide-by-zero" checks in TradeStation Pro



PureBytes Links

Trading Reference Links

As mentioned by "DH" his post of 7/24 and in my post yesterday
"TradeStation Precision - Summary", Clyde Lee confirmed that the
"divide-by-zero" checks have been removed from the function library
in TradeStation Pro. Here is a quote from a message from EasyLanguage
Support:

 "It was a design decision to remove-by-zero checks in our
  built-in functions as in principle it is up to the user
  to make sure that only divisors not equal to zero are
  passed to the functions. However, we do understand that
  the way it was before was a convenience of which the
  users were found.

  We will bring this issue to management. However, please
  be aware that in the mean time that though you cannot
  edit built-in EasyLanguage documents, it is possible
  for you to cut and paste the text and create a new and
  editable one with it."

Hard to believe but true. This will mean that many of the
TradeStation Pro functions will cause a "divide-by-zero" runtime
error(and turn off the Status) when one of the routines encounters
some combination of conditions on some bar that results in a zero
divisor.

Definitely a very bad design decision...

The messages are quoted below with Clyde's permission.

Bob Fulks




-----Original Message-----
From: Clyde Lee [<mailto:clydelee@xxxxxxxxxx>mailto:clydelee@xxxxxxxxxx]
Sent: Sunday, July 08, 2001 3:23 PM
To: EasyLanguage
Subject: Major Problems with TSPro

Several months back I subscribed to TSPro and eventually gave up
and dropped my subscription because of lack of available data and
total failure of TSPro to be able to execute routines that were
excellent in  TS2000i.
 
I have again subscribed and as of this minute it does not appear
that anything has changed insofar as TS2K and TSPro compatibility
are concerned.
 
Attached are several items:
 
1.  An  .ela  file which works fine in TS4 and TS2000i but
    fails in TSPro (to be illustrated later).  This was
    imported into TSPro to make sure things were equal.
 
2.  Omega1.gif -- a picture showing execution of the routine
    in TS2K and displaying the input values used. 
 
3.  Omega2.gif -- a picture showing setup to run in TSPro
    just before clicking OK for it to execute.
 
4.  Omega3.gif -- a picture showing the error message when
    this indicator attempted to execute (worked OK in TS2K).
 
5.  Omega4.gif -- If I attempt to revive the routine by
    trying to turn it back on after the error then this is
    the error message that is received AND IT IS TOTALLY WRONG.
 
So now how about putting a bit of effort into finding out
what is wrong here.
 
I guarantee you that the data is the same since the data used
by TS2K was sent to an ascii file by TSPro and imported into
TS2K to insure running on identical data.
 
Clyde Lee
 


----- Original Message -----
From: <mailto:EasyLanguageSupport@xxxxxxxxxxxxxxxx>EasyLanguage
To: <mailto:clydelee@xxxxxxxxxx>'Clyde Lee'
Sent: Tuesday, July 10, 2001 15:17
Subject: RE: Major Problems with TSPro

20010710BB

Clyde Lee, we appreciate you taking the time to send us an inquiry.

We confirm. The analysis technique as currently written will generate
under certain circumstances a divide by zero error message. This is
caused by a division where a zero is used in the denominator. This
can be traced to the LinearRegValue() and LinearRegSlope() functions,
both of which call another function named LinearReg(). The
LinearReg() function uses instructions similar to the following.

oLRSlope = ( Length * SumXY - SumX * SumY) / Divisor ;
oLRIntercept = ( SumY - oLRSlope * SumX ) / Length ;

The error can also be traced to the StdDev() function, which in turn
calls another function named StandardDev(). The StandardDev()
function uses instructions similar to the following.

if SumSqr > 0 then
 StandardDev = SquareRoot( SumSqr / Divisor ) ;

At any time, any one of these lines could be the source of the divide
by zero error. In order to correct your analysis technique, you will
need to create your own variation of these functions and modify them
to include a check for a zero denominator. For example:

if Divisor <> 0 then oLRSlope = ( Length * SumXY - SumX * SumY) / Divisor ;
if Length <> 0 then oLRIntercept = ( SumY - oLRSlope * SumX ) / Length ;

if Divisor <> 0 then
 StandardDev = SquareRoot( AbsValue(SumSqr / Divisor) ) ;


Thank you for choosing TradeStation Technologies, Inc.

Benjamin Blanco, CES
Certified EasyLanguage Specialist, Software Support


----- Original Message -----
From: <mailto:EasyLanguageSupport@xxxxxxxxxxxxxxxx>EasyLanguage
To: <mailto:clydelee@xxxxxxxxxx>'Clyde Lee'
Sent: Wednesday, July 11, 2001 16:40
Subject: RE: Major Problems with TSPro

01071101ELEL

Attn: Clyde Lee,

Thank you for using TradeStation technologies, Inc.

It has been brought to our attention that you were not happy with our
last answer.

We have decided that further clarification might help.

It was a design decision to remove-by-zero checks in our built-in
functions as in principle it is up to the user to make sure that only
divisors not equal to zero are passed to the functions. However, we
do understand that the way it was before was a convenience of which
the users were found.

We will bring this issue to management. However, please be aware that
in the mean time that though you cannot edit built-in EasyLanguage
documents, it is possible for you to cut and paste the text and
create a new and editable one with it.

Thank you for your patience and understanding.



Best regards,

Emmanuel Lavelanet

EasyLanguage/Developer Support

TradeStation Technologies, Inc.