Australian (ASX) Stock Market Forum

AmiBroker: How to scan 1 hour interval chart?

Joined
21 October 2012
Posts
46
Reactions
0
I have a small AFL code to scan BUY signals.

Buy=Cross(MA(C, 20), MA(C,50));
Sell=Cross(MA(C, 50), MA(C,20));
Buy = ExRem(Buy,Sell);


I want to do Auto Analysis to find Buy signals in 1 hour chart.

How do I tell AmiBroker to scan on 1 hour interval chart ?

Here is the scan settings....What changes I may require here ?

backtest.png
 
You need to choose the base time interval in File - Database settings. So if you want to have tick or 1second interval being set as minimum then always use data base settings first. Then all intervals starting from base time interval will be visible in backtest setting 'Periodicity'.
 
You need to choose the base time interval in File - Database settings. So if you want to have tick or 1second interval being set as minimum then always use data base settings first. Then all intervals starting from base time interval will be visible in backtest setting 'Periodicity'.

Thanks. This is working...I have modified database settings - base time interval to 1 minute.

Still have one issue...

When I scan with the above AFL code I get BUY and SELL both signals in the scan result .....why I'm getting both signals ? .is there any way to remove SELL signals from scan result ?

I just chose 100 recent bars scan range so that I get the last BUY signal for all symbols.

You know my objective is to get a scan of LAST 20, 50 crossover as BUY signal in a hourly chart for all symbols in the database.
 
Top