Can one backtest in multiple timeframes

#1
hi
I want to backtest a system on Nifty intraday data.It will buy at positive End of day close .
sell condition is to be optimized as time next day (say 9.15 to 3.15).

Following afl that I am trying is not working.

TimeFrameSet( inDaily );
r1 =ROC(C,1);
TimeFrameRestore();
Buy= TimeFrameExpand( r1, inDaily)>0;
Sell= TimeNum()== 093000;
//Optimize("time", 13, 091500,151500,30);



Is it possible to backtest in multiple time frame in AB.

thanks in advance
 
#2
hi
I want to backtest a system on Nifty intraday data.It will buy at positive End of day close .
sell condition is to be optimized as time next day (say 9.15 to 3.15).

Following afl that I am trying is not working.

TimeFrameSet( inDaily );
r1 =ROC(C,1);
TimeFrameRestore();
Buy= TimeFrameExpand( r1, inDaily)>0;
Sell= TimeNum()== 093000;
//Optimize("time", 13, 091500,151500,30);



Is it possible to backtest in multiple time frame in AB.

thanks in advance

Yes it is possible to backtest multiple time frames.


Code:
TimeFrameSet( inDaily );
r1 = ROC( C, 1 );
TimeFrameRestore();

dd = Day();

Buy = TimeFrameExpand( r1, inDaily ) > 0 AND dd != Ref(dd, -1);
Sell = TimeNum() >= 093000;
//Optimize("time", 13, 091500,151500,30);

Short = Cover = 0;
 
#3
Thanks for the help garyc1st.

Although I was eventually able to do it by

Buy = TimeFrameExpand( r1, inDaily ) > 0 AND TimeNum()== 153000;

but your solution is more robust.

thanks again



Regards