Step 0: Amibroker
Install Amibroker. No need to create a database.
Step 1: RAM Disk
Download 1 Install RAM Disk.bat batch file and double click to execute. After installation complete , it open Ram Configuration .
Change these two. 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.
Alternatively (Without Batch Script) 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 2 Install Python.bat batch file and double click to execute. It will Install 3.13.7.
Alternatively (Without Batch Script) download official Python 3.13.7 or latest version from here . Watch this video for installation instructions . Jupyter notebook not required.
Step 3: Python Libraries
Download 3 Install Py Libraries.bat this batch file and double click to execute. It update PIP and install required libraries.
Alternatively you can 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 seleniumbase==4.44.17
Here PyJWT Selenium webdriver-manager seleniumbase are not required for Flattrade but required for other brokers.
Step 4: Create Folders and Download Files
Download 4 Flattrade Ami32.bat for Amibroker 32 bit and Windows 64bit or Download 4 Flattrade Ami64.bat for Amibroker 32 bit and Windows 64bit . Double click to execute .
It creates required folders, download files and put in respective folder.
Alternatively (Without Batch Script) Create a Folder in C Drive as 'API' and 'HistoricalData'. Then keep drive letter as 'R'. In codes , these are default path to be used. if you want different paths change them in codes. Put all .csv files .py scripts in API folder. Ram Disk R is for to save response file. HistoricalData folder is for long period data download. All codes download here. Download Flattrade Login 1.py and Flattrade Limits 1.py and Put these two scripts in API folder (C:\API) . Download Flattrade Dasboard.afl and put in custom folder. Download format file OneMinuteFeed.format . Put the files in Format folder in Amibroker installation folder. For 32bit it is C:\Program Files (x86)\AmiBroker\Formats. OneMinuteFeed is for live feed. Download FlatTrade OneMinuteFeed.py and FlatTrade Backfill.py and put in C:\API folder . Open import.types file in the format folder by notepad add the following line.
OneMinuteFeed (*.*)|*.*|OneMinuteFeed.format
and save it. it is for manual importing data files from Amibroker Import ASCII.
Step 5: Database
Download 5 Database.bat for Amibroker 32 bit and Windows 64bit or Download 5 Database Ami64.bat for Amibroker 32 bit and Windows 64bit.
Alternatively Create new database with base time interval 1 minute. Keep it default database. Download Dummysymbol.csv and import using OneMinuteFeed.format .
Points to Remember
Batch files are created for easy quick install. But you should understand what it does. It is explained in the blog. All batch files are for 64 bit windows. For Amibroker it has 32 bit and 64 bit.
Installation charges as per freelance to install through anydesk. But if you cannot install yourself, don't use this code. Because if there are any changes in broker or python, I cannot help immediately. I instruct only which accounts I am using. For example, now I use Flattrade for data, order placement for Kotak. If there is an issue, I can tell. But for other brokers I may not give solution immediately. Text support is free. But I can give in my free time only. Telegram call support for tamil only.
Don't run Amibroker as administrator. It is for data feed users . If you use order placing only, then no problem.
Avoid using Antivirus. Windows defender is enough. If you have separate system for trading, you can stop defender also.
If you have installed both 32 bit and 64 bit take some care. I don't know, it make any issue.
Datafeed send data to the opened amibroker, irrespective of default database . If you opened two databases (two Amibroker instances) take care.
Always keep two brokers for live feed.
Start your datafeed as much as early as possible. We can start around 8AM also. Also if need place dummy order and check. Password expired, Expiry date changed, API issue etc. can verify.
When Backfilling or live feed there is green bar scrolling or blinking at bottom of Amibroker. For backfilling progress for importing is ok. But for live, it should like as blinking. In live , if it visible slowly, then there will be lag in data feed. In ram disk , live csv file size less than 20kb is good. If it more than 30kb it will slow. Don't use tick datafeed unnecessary.
You can run two feed parallel/simultaneously. Check both have different name for live CSV. Do this for one minute feed only . Not for tick data. Once I compared Flattrade with shoonya, Flattrade with Alice Blue all are same only. So one feed candle replace other. It won't make any issue. Initially I tried few days.
Tick database
If you use tickdata, for backfilling we get one minute data only. After backfill it come different kind of chart with mixed candle and ticks. So after deleting tick data backfill with one minute is good. Soon I add an option to delete quote.
Curl
From 2018, all windows/server curl is pre installed. To check curl, open cmd and types as following and enter.
curl --help
It shows the help menu. Otherwise say error. If you use windows 7/8 only you need to install curl. Check my you YouTube video to install curl.
Python
I am using official python and IDLE only. Current code are tested in 3.13.7 . Currently batch file install tested version libraries.
If you are already using any older python version, anaconda, VS code or any other Python, you are considering as developer. So you should solve issues by yourself (with help of AI). Particularly for VS code. VS code get python interpretor from Microsoft as add-on. But to use python outside of VScode we need to install python to execute from python. So you take care.
Initially I started with anaconda and develop through jupyter notebook. But now I use IDLE only. Don't use notebook. To check older notebook , I installed jupyter notebook with official python.
SSL Certificate Error
This certificate verification can be bypassed. It may be ok for data, but not for the order place.
First try Windows Update. Also try by disabling Firewall.
After update also not work, Download Certi Cerificate to SSL.py script and double click to execute or run in IDLE. It copy Certi certificate to SSL. It require admin. may require disable antivirus. If this script not work, do manually as follows
Copy certificate file cacert.pem from C:\Program Files\Python313\Lib\site-packages\certifi\ and create folder SSL in C:\Program Files\Common Files\SSL And paste it then rename it to cert.pem
If Certificate path cannot find, Download SSL Certi Certificate Path.py script and run in IDLE. It show the path of both certificates.
Sys.arg
in some scripts like historical data, master , you can see this sys.argv[1] these are need to execute from amibroker. these variable values are need to send from amibroker. if you execute this directly it give error as index out of range. if you want run directly from IDLE or execute, disable these inputs enable manually. remove the triple quotes for above inputs and disable sys.argv inputs