PureBytes Links
Trading Reference Links
|
Hello,
I have observed something worth noting when using automatic analysis,
here is an excerpt of a code using a custom backtester. The structure
of the code is the one shown in TJ's slides on custom backtesting
(don't know whether the order between the 2 steps is significant or not):
// phase 2 of the backtesting :
if (Status("action")==actionPortfolio) {
bo = GetBacktesterObject();
bo.backtest();
// ...
}
// phase 1: collect trading signals
Buy = ..
Sell = ..
It seems that "phase 1" of the code is executed twice, the first time
with data arrays actually corresponding to the ticker (e.g. Close) and
the second time with arrays made of null values .. it is like after
the end of backtesting the execution goes on but this time with a
dummy ticker ..
A way to avoid this double-execution is to place phase 1 inside an
else instruction:
if (Status("action")==actionPortfolio)
{ // phase 2
) else {
// phase 1
Buy =
Sell =
}
Could somebody confirm that or is it just me hallucinating : ) ?
Thanks a lot,
Nicolas
Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.430 / Virus Database: 268.15.0/557 - Release Date: 11/29/2006 4:15 PM
|