Hi,

I'll admit that I have not used multiple time frames. So, this is just a shot 
in the dark. But, have you remembered to call TimeFrameExpand on 'cr'?

See example in TimeFrameSet documentation
http://www.amibroker.com/guide/afl/afl_view.php?id=242

Mike

--- In [email protected], Potato Soup <potatoso...@...> wrote:
>
> Thanks James, but I believe I'm doing it the correct way. Here's exactly what 
> I'm doing:
> 
> I have a chart with say MSFT, it's a minutely chart. I then load up the 
> backtester tool, and pick out my AFL code. In the settings, I ensure that the 
> period for the backtest is also minutely. I then have the following script in 
> the beginning of my AFL:
> 
> TimeFrameSet(inHourly);
> cr = Correlation(Foreign("MSFT", "Close"), Foreign("ZZZZ", "Close"), 24);
> TimeFrameRestore();
> 
> That time series should be based on an hourly closing price, right? Well when 
> I look at the data in this series when taken from the above code, and compare 
> it to when I apply the Correlation function to an hourly chart of MSFT + 
> ZZZZ, the two series arenot the same.
> 
> In fact, the series I'm getting is a minutely one. So is there something I'm 
> doing wrong?
> 
> Thanks for any suggestions, this is bugging me a lot!
> 
> 
> 
> 
> ________________________________
> From: James <jamesmemp...@...>
> To: [email protected]
> Sent: Tue, December 1, 2009 10:50:39 PM
> Subject: Re: [amibroker] Is there a way to backtest on a minutely basis but 
> still reference hourly data?
> 
>   
> 
> 
> Potato,
>  
> I'm pretty sure you cannot work in larger time frames and analyze smaller 
> time frames. It sounds to me like you are trying to work off an hourly chart, 
> but get analysis from a minute chart. I think it needs to be the other way 
> around, ie, get analysis from an hourly chart looking at a minute chart.
>  
> James
> 
> 
> 
> 
> ________________________________
>  From: Potato Soup <potatoso...@...>
> To: AmiBroker (Discussion List) <[email protected]>
> Sent: Tue, December 1, 2009 10:05:17 AM
> Subject: Re: [amibroker] Is there a way to backtest on a minutely basis but 
> still reference hourly data?
> 
>   
> Anyone have any ideas?
> 
> ________________________________
>  
> From: Potato Soup <potatosoupz@ yahoo.com> 
> Date: Mon, 30 Nov 2009 22:27:57 -0800 (PST)
> To: <amibro...@yahoogrou ps.com>
> Subject: Re: [amibroker] Is there a way to backtest on a minutely basis but 
> still reference hourly data?
> 
> Thanks, but it seems this doesn't work during backtests, am I wrong? When I 
> use this during backtests, it seems the backtest is still using the time 
> series from the interval of the backtest settings, say 30 minutes, even 
> though the series that I am accessing in the backtest is sandwiched between 
> calls to SetTimeFrame/ RestoreTimeFrame calls, having set it at 1hr. Is it 
> known that backtests will ignore this function?
> 
> 
> 
> 
> ________________________________
>  From: Ronald Davis <xok...@yahoo. com>
> To: amibro...@yahoogrou ps.com
> Sent: Tue, December 1, 2009 12:09:22 AM
> Subject: Re: [amibroker] Is there a way to backtest on a minutely basis but 
> still reference hourly data?
> 
> 
> 
> 
> Hi potato, I have never used it, but here is a link about changing time 
> frames>http://www.amibroke r.com/guide/ h_timeframe. html
> 
> 
> 
> 
> ________________________________
>  From: potatosoupz <potatosoupz@ yahoo.com>
> To: amibro...@yahoogrou ps.com
> Sent: Mon, November 30, 2009 7:05:57 PM
> Subject: [amibroker] Is there a way to backtest on a minutely basis but still 
> reference hourly data?
> 
> I would like to check the signal on every minute bar, but my signals are 
> based on indicators that are setup with hourly bars.
> 
> 
> 
> ------------ --------- --------- ------
> 
> **** IMPORTANT PLEASE READ ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
> 
> TO GET TECHNICAL SUPPORT send an e-mail directly to 
> SUPPORT {at} amibroker.com
> 
> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> http://www.amibroker.com/feedback/
> (submissions sent via other channels won't be considered)
> 
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
> 
> Yahoo! Groups Links
>


Reply via email to