How to close open positions at the end of the day (for daytraders)

If we are backtesting the intraday strategy and we do not want to keep open positions overnight – then it’s necessary to force closing all the open positions before the session end. In order to code it in AFL – the easiest is to use TimeNum() function for that purpose. (more…)

Running AmiBroker on Windows Vista (both 32 and 64 bit editions)

Generally speaking AmiBroker (both versions: 4.80.2 official and 4.87.1 latest beta) run fine on Windows Vista RC1 32 bit and 64 bit editions (yes we checked it). (more…)

How to combine two databases into one

If you ever wondered how to combine two databases into one this short article will show you how, but let us start with some background first… (more…)

How to save layouts that hold individual parameter values for different symbols.

By default the values of parameters for given indicator pane are the same (shared) for all symbols. If you want per-symbol parameters, you need to apply technique descibed in this short article. (more…)

How to set individual trading rules for symbols in the same backtest

The following code shows how to use separate trading rules for several symbols included in the same backtest. (more…)

Stops priority in the default backtest procedure in AmiBroker

The order stops are triggered in the backtest is the following:
 - Fixed Ruin stop (loosing 99.96% of the starting capital)
 - Max. loss stop
 - Profit target stop
 - Trailing stop
 - N-bar stop* (see below)

In versions 4.61 and higher: you can decide if N-BAR stop has the lowest or the highest priority. (more…)

How to change property for multiple symbols at once.

In order to automatically change a property for many symbols – instead of manual action in Symbol -> Information dialog one can use OLE automation.
For example – to unmark “Use only local database” option for all the symbols, it’s enough to run such SCAN: (more…)

Price chart with independent style

If one wants to display a Candlesticks in one chart pane and Bars in another one, then it’s necessary to use a formula which does not read the settings from: View -> Price Chart Style.

The following custom Price formula allows to achieve this: (more…)

AmiBroker for FOREX

Here is an article that tells you everything you need to know about using AmiBroker for trading FOREX markets. (more…)

How to display arrows for trades generated in backtest?

In order to display trade arrows, first of all – it’s necessary to enable the arrows for particular chart. To do so – right-click on the chart pane of your choice, choose: Parameters -> Axes&Grid, then set: Show trading arrows to YES, as shown in the screenshot. (more…)

« Previous PageNext Page »