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

more on (moron?): EasyLanguage bug w/ OpenPositionProfit?



PureBytes Links

Trading Reference Links


It seems to be a precision problem:  When I buy 10, buy 10, exitlong 20
instead of 100,100,200 then the OpenPositionProfit is correct.  Any idea how
to fix this?

-----Original Message-----
From: Alex Dannenberg [mailto:Alex@xxxxxxxxxxxxxxxxxxxxxxx]
Sent: Monday, December 27, 1999 12:22 PM
To: 'Omega List'
Subject: RE: EasyLanguage bug w/ OpenPositionProfit?


True enough...  To more cleanly illustrate the problem w/
OpenPositionProfit, then, try the following instead of the code I originally
posted.  You may substitue any 3 sequential dates for which there exist
data:

if Date=990607 then buy 100 shares AT next bar open;
if Date=990608 then buy 100 shares AT next bar open;
if Date=990609 then exitlong 200 shares at next bar open;
if Date>=990607 and Date <=990612 then print(" date ", date, "
OpenPositionProfit ",OpenPositionProfit);







-----Original Message-----
From: Dennis Holverstott [mailto:dennis@xxxxxxxxxx]
Sent: Monday, December 27, 1999 12:12 PM
To: Omega List
Subject: Re: EasyLanguage bug w/ OpenPositionProfit?


> SecondDate=FirstDate+1;

that will often fail. example....

990831 + 1 = 990832 (an invalid date)

try

SecondDate = juliantodate(datetojulian(FirstDate) + 1)

--
  Dennis