I have to admit that I forgot "expandFirst" option in TimeFrameExpand().
It means that there is no problem with recreating higher timeframe indicators 
on lower timeframe charts (assuming traditional approach). I fully realize that 
the signals generated during incomplete bars may disappear at the end of the 
higher time period, therefore it is useless for back testing. On the other hand 
using "expandLast", although fully back testable, might have very little value. 
Assuming monthly higher timeframe there should not be much surprise that 
potential signal generated at the end of the month might not reflect much what 
has been happening during this month. But that's the nature of the traditional 
multi timeframe concept.
What Jorgen has been trying to accomplish has very little to do with 
traditional multi timeframe approach implemented in AB, with one exception - he 
has been trying to adopt the existing mechanism for his own purposes.
By definition, higher timeframe returns results at the end of the timeframe. If 
the timeframe is complete the result is as of Friday (assume weekly and 
daily),if not the results are at the last day of the incomplete timeframe 
(assume using "expandFirst" option). So if the current timeframe hits Thursday 
it returns results as of Thursday - based on combined data (highest high, 
lowest low,etc) from Monday till Thursday (NOT FOR EVERY BAR FROM MONDAY TILL 
THURSDAY). What Jorgen wants is a mixture of higher and lower timeframe data to 
calculate results for every bar. If the bar is Friday (boundary of the higher 
timeframe) the results of his calculations match 100% of the traditional higher 
timeframe. In this case he can use the existing multi timeframe mechanism in 
AB. For any other DAILY bar he would like to take data from previous complete 
higher timeframes (Fridays) and combine it with the daily data for this bar. 
There is no way to use build in indicators to handle such combined data. Every 
indicator (even simple MA) has be custom built to handle such data (RSI, 
Stochastic ,.... have to be re-implemented from scratch). For the pain there is 
a gain. Potential signals generated for every bar do not disappear at the end 
of the timeframe, therefore the entire method can be back tested.
I hope I am right this time and it can help understand potential multi 
timeframe alternatives.

AF

Reply via email to