PureBytes Links
Trading Reference Links
|
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
|