[amibroker] How to backtest with multiple timeframes

 

Have you ever made a script that examines multiple timeframes, and that you could backtest it?

I imagine that you have to make a loop that will go to each bar, examine what is happening in the upper timeframes, and then return to the current (lower) timeframe and create the buy/sell signals.

One very big problem is that when you use TimeFrameSet( interval), the BarCount does not change (see https://www.amibroker.com/guide/h_timeframe.html).  and neither barindex.  My algorithm depends heavily on barindex.

I can imagine the algorithm to have the following structure:

// I am in 1min timeframe
for( i = 1; i < BarCount; i++ )
{
check_Daily_TimeFrame();
check_Hourly_TimeFrame();
check_5min_TimeFrame();

create_buy_sell_signals(); // this is in 1min TimeFrame
}

__._,_.___

Posted by: "B. Pitatzidis" <bobptz@gmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Save time and get your email on the go with the Yahoo Mail App
Get the beautifully designed, lighting fast, and easy-to-use, Yahoo Mail app today. Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.

**** 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/


.

__,_._,___


EmoticonEmoticon