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

Re: [amibroker] Backtest



PureBytes Links

Trading Reference Links

Hello,
 
You have to access array elements explicitely, because WriteVal applied to the array
will give you just last value.
 
if (status("action")==5)
{
for (j=Barcount-300; j >= 0 AND j<Barcount;   j++)
{
_trace("Backtest - Buy " + Writeval(Buy[ j ],1.0) + " Sell " + writeval(Sell[ j ],1.0));
}
}

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
To: AB-Main
Sent: Wednesday, August 17, 2005 7:51 AM
Subject: [amibroker] Backtest

How can I access the contents of the Buy and Sell arrays that the backtester sees?
 
I used:
if (status("action")==5)
{
for (j=Barcount-300; j<Barcount;   j++)
{
_trace("Backtest - Buy " + Writeval(Buy,1.0) + " Sell " + writeval(Sell,1.0));
}
}
 
trying to print  (in debug viewer) last 300 data points in arrays for the trade signals.
 
Even though the backtester created a valid report, all positions of buy and sell arrays were 0 (Zero) in the printout.
 
Thanks
 
Ara


Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





YAHOO! GROUPS LINKS