Australian (ASX) Stock Market Forum

Amibroker Intraday period backtesting

Joined
15 August 2009
Posts
7
Reactions
0
Hi all,

I want to design a intraday emini future day trading system that trade from 9:40am to 12am EST every day and hence need to backtest in that time period every day. Does anyone have the code or know how to do this with backtesting in Amibroker?

Thanks in advance.

KJ
 
Hi all,

I want to design a intraday emini future day trading system that trade from 9:40am to 12am EST every day and hence need to backtest in that time period every day. Does anyone have the code or know how to do this with backtesting in Amibroker?

Thanks in advance.

KJ



You need tick data.
very expensice.
 
Hi KJ --

You can get some historical intraday data (1 minute or 5 minute bars) to begin developing your system from one of the data vendors either free or for a one-time charge. Several are listed here:
http://www.blueowlpress.com/resources.html#dataproviders

When you begin trading, you will need an intraday data feed. The one I recommend is DTN IQ. The cost will be about US$80 per month, depending on what feeds you get.

Do not rely on the realtime data from your broker (such as Interactive Brokers) to build a database of intraday data -- they do not transmit all of the transactions.

There is a big advantage -- even a necessity -- to have the historical database you use for development and testing and the realtime feed you use to generate your trading signals come from the same data vendor. The implication is that you might do your preliminary testing using one of the one-time vendors, but you should double-check using the data from your realtime feed before beginning to trade.

Thanks,
Howard
 
Hi Howard,

I understand the stuff about tick data and so on. However, can you tell me whether I can confine the backtesting period to an interval such as 9:40 to 12am every trading day instead of the whole day with Amibroker. If this is possible, what is the code for this?

Thanks,

KJ
 
Have a read about the TimeNum array in Amibroker..

To allow it to trade 9:40 to 12am you need to add buy and sell conditions.

A buy condition will be

Cond1 = TimeNum() >= 094000 && TimeNum() <= 120000;
Buy = Cond1 && (your other buy criterea);

You might also want to force a sell at 12

Cond2 = TimeNum() > 120000;
Sell = (your sell condition) OR Cond2;

Regards
Brad
 
Hi all,

I want to design a intraday emini future day trading system that trade from 9:40am to 12am EST every day and hence need to backtest in that time period every day. Does anyone have the code or know how to do this with backtesting in Amibroker?

Thanks in advance.

KJ

This syntax is for Time/Date with an example below. Connection to the website is here.
http://www.amibroker.com/guide/afl/afl_index.php?m=2

AddColumn( DateTime(), "Date / Time", formatDateTime );


Example

Buy=Cross(MACD(),Signal());
Sell=Cross(Signal(), MACD());
Filter=Buy OR Sell;
SetOption("NoDefaultColumns", True );
AddColumn( DateTime(), "Date", formatDateTime );
AddColumn( IIf( Buy, 66, 83 ), "Signal", formatChar );
 
Top