Monday, September 14, 2026

Amibroker API Integration - Installation

 

Download Script files for Step 1 to Step 3 from AmibrokerAPI - "Install" topic and run one by one. 


Step 1: RAM Disk 

Ram disk is for saving response files, live feed CSV and backfill data.

Download Install RAMDisk.js script and double click to execute. After installation complete , it open Ram Configuration .


Change these two items. File System to FAT32 and Untick Create Temp Folder. Keep Drive letter as R. Size 64MB. Leave others default as in image. Then click "OK". Then windows open properties window of new drive. Close it. Then click "Exit" in Imdisk.

Step 2: Python

Download Install Python.js script and double click to execute. It will Install Python and required Libraries.

Step 3: Prepare Amibroker

Download Prepare Amibroker.js script file and double click to execute. It is for 64bit windows and 32 bit Amibroker. It download dummy database with dummy symbol. Then it download format files and import.types files to formats folder. Then it create default folders. 

If you want to use existing database, do this step manually.

If you have saved any custom.format in ASCII import wizard, take backup of import.types and after scrip file complete, replace import.types in formats folder and add the following lines in top of import.types file.
Candle (*.*)|*.*|Candle.format
Tick (*.*)|*.*|Tick.format
EOD (*.*)|*.*|EOD.format
MasterInfo (*.*)|*.*|MasterInfo.format





If you pin these folders in Quick Access as above, it will be easy to access these folders.

Folder names , Files Names and Paths should be same as said here. Otherwise it not read, write or execute.

Step 4: Download Files, Scripts and Folders

1. Scripts: Put all python scripts (*.py) in this folder.

2.  Put all csv files. *List.csv and IndexMaster.csv. *List.csv files are list of symbols to get tokens. 

3. Amibroker Custom Folder: Put all AFLs in Amibroker Formulas/Custom folder.




 
================================================

Manual Install (Without Script): 

Step1: RAM Disk
Download RAM Disk from here and Install. Watch this video for installation instructions. Open ram configuration , from start menu and set above settings.

Step 2: Python
Download official Python 3.13.7 or latest version from here . Watch this video for installation instructions and using IDLE. If you use VSCode, you need to install offical python and libraries, then make offiical python as default open for .py files. If you have Anconda, check python script woorks anywhere from PC and install only missed libararies. 

Install required libraries manually. Open Command Prompt and enter following commands.

PIP Update

python.exe -m pip install --upgrade pip

Install Libraries 

python.exe -m pip install requests==2.32.5 pyotp==2.9.0 websocket-client==1.9.0 aiohttp==3.12.15 pandas==2.3.2 pywin32==311 nest-asyncio==1.6.0 PyJWT==2.10.1 selenium==4.38.0 webdriver-manager==4.0.2 protobuf==7.35.1 playwright==1.62.0

after install complete close CMD and open again, then enter following command

playwright install chromium

Step 3: Prepare Amibroker

Create new database with base time interval 1 minute. Keep it default database. We use datafeed GUI in AFL. Soo in empty database we cannot use AFL. So download Dummysymbol.csv and import using Candle.format . If you use existing database, you don't need dummy symbol import.
Put all format files in this folder. Candle.format, Tick.format, EOD.format, MasterInfo.format etc.
In the Formats folder, open the file import.types in notepad, Then add following lines in the top and save it.
Candle (*.*)|*.*|Candle.format
Tick (*.*)|*.*|Tick.format
EOD (*.*)|*.*|EOD.format
MasterInfo (*.*)|*.*|MasterInfo.format
It is for manual importing data files using Amibroker Import ASCII. Importing through script, it is not required to modify import.types file.

Create a Folder in C Drive as 'API' Then in folder 'API', Create three folders. 1.Scripts 2. Files 3. HistoricalData

1. Scripts: For python scripts (*.py).
2.Files: This folder is for create token master files.
3.HistoricalData: Historical data downloads are saved in this folder.

Step 4: Download Files, Scripts and Folders

1. Scripts: Put all python scripts (*.py) in this folder.

2.  Put all csv files. *List.csv and IndexMaster.csv. *List.csv files are list of symbols to get tokens. 

3. Amibroker Custom Folder: Put all AFLs in Amibroker Formulas/Custom folder.