Amibroker India: How to Backtest and Analyze Trades
Amibroker is a powerful technical analysis and backtesting platform used by serious traders across India and the world. With its speed, flexibility, and advanced scripting language (AFL), Amibroker enables Indian traders to build, test, and refine profitable strategies using historical and real-time market data.
In this guide, you’ll learn how to use Amibroker in India to backtest and analyze trades, along with setup steps and data feed options.
Why Use Amibroker for Backtesting?
Amibroker is trusted for its ability to:
- Build custom strategies using AFL (Amibroker Formula Language)
- Run historical backtests across years of market data
- Simulate trades with detailed metrics (win rate, drawdown, Sharpe ratio, etc.)
- Optimize strategy parameters automatically
- Perform walk-forward testing and out-of-sample validation
For Indian traders, it supports integration with NSE live data through SEBI-authorized data vendors.
Setting Up Amibroker in India (2025)
Step 1: Purchase and Install Amibroker
- Visit www.amibroker.com
- Choose the Standard or Professional Edition
- Install the software on your Windows PC (Amibroker is not available on Mac or web)
Step 2: Subscribe to a Real-Time NSE Data Feed
You’ll need a data vendor authorized by NSE. Popular options include:
- TrueData
- GlobalDataFeeds (GDFL)
- Neotrade Analytics
They provide plugins to connect Amibroker with real-time and historical NSE data.
Step 3: Configure Data Plugin
- Install the plugin provided by your data vendor
- Launch Amibroker and select the data source (e.g., TrueData AFL Plugin)
- Load NSE stock symbols and start receiving live tick data
How to Backtest a Trading Strategy in Amibroker
Step 1: Write a Strategy in AFL
Example: Simple Moving Average Crossover Strategy
aflCopyEditBuy = Cross(MA(Close, 20), MA(Close, 50));
Sell = Cross(MA(Close, 50), MA(Close, 20));
BuyPrice = Close;
SellPrice = Close;
Step 2: Apply the Strategy to a Chart
- Open a chart for any stock (e.g., NSE:INFY)
- Apply your AFL strategy to view signals
Step 3: Run the Backtest
- Go to Analysis > New Analysis Window
- Select your AFL file
- Choose the stock list (watchlist or market segment)
- Set backtest range (e.g., last 3 years)
- Click Backtest
Step 4: Review the Results
You’ll get a detailed report that includes:
- Total number of trades
- Net profit/loss
- Win rate and expectancy
- Maximum drawdown
- Trade log and equity curve
Key Metrics to Analyze in Backtesting
Metric | Meaning |
---|---|
Win Rate | Percentage of profitable trades |
Profit Factor | Ratio of gross profit to gross loss |
Drawdown | Largest decline from peak to bottom |
Sharpe Ratio | Return vs risk-adjusted volatility |
Expectancy | Average expected return per trade |
Tips for Indian Traders Using Amibroker
- Use NSE cash + F&O symbols from your data feed
- Avoid curve fitting – don’t over-optimize to past data
- Use walk-forward testing for better real-market validation
- Scan for live signals intraday using Amibroker’s Exploration feature
- Maintain data integrity by using verified data sources only
Limitations to Note
- Requires Windows PC and manual configuration
- No mobile or web access
- AFL scripting has a learning curve
- Trading automation needs external broker bridge (not built-in)
FAQs
Q1: Can I use Amibroker for real-time intraday trading in India?
Yes, with a real-time NSE data feed from vendors like TrueData or GDFL.
Q2: Is Amibroker suitable for beginners?
It is more suited for intermediate and advanced traders due to its scripting requirements.
Q3: Can I automate trades directly from Amibroker?
Not directly. You need an API bridge from your broker or a third-party solution.
Q4: How much historical data can I backtest in Amibroker?
Depends on the vendor, but many offer 5–10 years of EOD and 180+ days of intraday data.
Q5: Is Amibroker legal and SEBI-compliant in India?
Yes. Just ensure you use NSE-authorized data vendors.