Hi Mike,
below is what I wanted to do. It is working fine. Thank you.
Could you help me to code this:
Have new column in backtesting result window that would be my own variable.
And it would look like MA(ROC(Ref(C,-1),1),5)
Is there any easy way? Could it be let's say the fourth column?
Thank you,
Radek
>
> If you are planning on having many custom backtest implementations, but few
> systems, then you can update System.afl to #include whichever custom
> backtest you want to test, then run the Ssytem.afl script. Any variables
> required by the custom backtester would be expected to be passed as
> procedure parameters.
>
> System.afl
>
> *#include* <CustomBacktest.afl>
>
> *Buy* = DayOfWeek() == 1;
> *Sell* = DayOfWeek() == 5;
> MyBackTestVar = *true*;
>
> SetCustomBacktestProc("");
>
> *if* (Status("action") == *actionPortfolio*) {
> RunCustomBackTest(MyBackTestVar);
> }
>
> Custom_Backtesting.afl
>
> *procedure* RunCustomBackTest(Var) {
> *if* (Var) {
> _TRACE("Var was true.");
> } *else* {
> _TRACE("Var was false.");
> }
>
> bo = GetBacktesterObject();
> bo.Backtest();
>
> // Add custom metrics here...
> }
>
> Mike
>
>
>