PureBytes Links
Trading Reference Links
|
The error below does not happen on IBM daily ascii data that I load
into TS2000i nor on S&P 5 index ascii data .
The data for the 36 day sine wave that I tested below was in MetaStock
format. When I converted the MS data to an ascii file that TS could
read and then loaded the ascii 36 day sine wave file all
OpenPositionProfit errors below disappeared. So the bug seems to be
between certain Metastock data and the TS import of that data.
Mike
---------- Forwarded message ----------
From: Mike Symth <mqsymth@xxxxxxxxx>
Date: Aug 4, 2005 1:32 PM
Subject: TS2000i Bug in OpenPositionProfit
To: omega-list@xxxxxxxxxx
I stumbled upon a new? TS2000i v5.00.0822 bug when using the TS
function of OpenPositionProfit
I created a sine wave with a period of 36 days that ranged from 1 to
3.4. I put the following simple strategy on the sine wave:
Input: MADays(26);
if c crosses above averageFC(close,MADays) then buy next bar on open;
if c crosses below averageFC(close,MAdays) then exitLong next bar on open;
if LastBarOnChart then begin
Print(date," ",time," ",entryprice," ", c," ",maxcontracts,"
",marketposition," ","openpp=",OpenPositionProfit);
end;
Now in the Format Strategy under the costs tab I put the the below
shares in the fixed unit box. As you can see anything above 5000
shares gave a bad openpositionprofit. The entry price was 2.06655
long and the c price on the lastbaronchart was 3.23947(TS rounds to
2 decimals). The same thing happened when I used dollars per
transaction instead of shares
Shares
991231.00 1600.00 2.07 3.24 30000.00 1.00
openpp= -50711.70
991231.00 1600.00 2.07 3.24 25000.00 1.00
openpp= -56576.30
991231.00 1600.00 2.07 3.24 10000.00 1.00
openpp= -31220.50
991231.00 1600.00 2.07 3.24 5000.00 1.00
openpp= 5864.60
991231.00 1600.00 2.07 3.24 4776.00 1.00
openpp= 5601.87
|