Ronen

Read the link you posted properly, it explains it clearly.

"In the next line we have "if" statement that enters custom backtest formula if the analysis engine is in actionPortfolio (2nd phase of portfolio backtest) stage. This is important as formula is executed in both scanning phase (when trading signals are generated) and in actual portfolio backtest phase. "if" statement allows us to enter custom backtest procedure part only when analysis engine is in actual backtesting phase."

Brenton


Ronen wrote:
Hi Mike

Thanks for your response. I'm referring to this...
http://amibroker.com/guide/a_custommetrics.html <http://amibroker.com/guide/a_custommetrics.html>

If you notice, the buy and sell references in the code are listed last, whereas in my example, I have it listed first which to me makes more sense.

--- In [email protected] <mailto:amibroker%40yahoogroups.com>, "Mike" <sfclimb...@...> wrote:
>
> What documentation are you referring to?
>
> Signals are processed first, then custom backtest code iterates bar by bar to process those Signals. Phase 2 follows Phase 1, as you would expect.
>
> Mike
>
> --- In [email protected] <mailto:amibroker%40yahoogroups.com>, "Ronen" <ronen.marom@> wrote:
> >
> > I'm puzzled why the call and processing of the custom backtester is happening before the array processing of the actual trading signals? Doesn't it have to be the other way around?
> >
> > /*********************************/
> > For example:
> >
> > // Phase 1
> > Buy = MybuyRules;
> > Sell = MySellRules;
> >
> > PositionScore = MyPositionOrdering;
> >
> >
> > // Phase 2
> > SetCustomBacktestProc("");
> >
> > if( Status("action") == actionPortfolio )
> > {
> > // Now do any modifications to the signals that were
> > // generated from the code above and/or produce additional
> > // statistics based on those signals.
> > }
> >
> > /*********************************/
> >
> > It is strange for me to think of a "phase 2" to be called before a "phase 1". But that is what is in all the documentation. I know I'm missing something, can someone fill me in?
> >
> > Thanks.
> >
>




__________ Information from ESET Smart Security, version of virus signature database 4993 (20100401) __________

The message was checked by ESET Smart Security.

http://www.eset.com



__________ Information from ESET Smart Security, version of virus signature 
database 4993 (20100401) __________

The message was checked by ESET Smart Security.

http://www.eset.com

Reply via email to