If you are a Amibroker user and recently testing with Ninjatrader 7 or have plans to migrate your EOD or 1min database to Ninjatrader then probably you need to aware about Ninjatrader ASCII format for EOD and 1min data and import procedure to migrate your dataset.
To be noted Ninjatrader 1minute format is in GMT time zone format. so one have to ensure converting IST or any other time zone format to GMT time zone. Amibroker AFL code presented here supports converting from IST time zone to GMT time zone. The AFL also avails the functionality to export both Daily and Minute bars in ASCII format as shown below
Each bar must be on its own line and fields must be separated by semicolon (;). Only 1 minute bars can be imported.
The format is:
yyyyMMdd HHmmss;open price;high price;low price;close price;volume
Each bar must be on its own line and fields must be separated by semicolon (;). Only 1 day bars can be imported.
The format is:
yyyyMMdd;open price;high price;low price;close price;volume
Amibroker AFL File to Export Amibroker Database to Ninjatrader ASCII format
Steps to Export Ninjatrader 7 ASCII format
1)Copy/Download Ninjatrader ASCII.afl and Save into Amibroker/formulas/Basic Charts or any other custom folders of your choice.
2)Goto C: Drive ->Create Folders amidata and create sub-folders named Daily and Minute inside amidata folder.
2) Open Amibroker and open the Database you want to import.
3)Goto New Analysis (Auto analysis for older version). Select the symbol or list of symbols(Filter -> Watchlist) need to be imported
4)Open the Parameter Box and Select the Daily or Minute Bars as shown in the video
5)Goto Settings -> Select the Period as 1minute / Daily timeframe which needs to be import into Ninjatrader 7 ASCII .txt format
6)Now Press Explore button. Ninjatrader 7 ASCII format gets exported to the relevant sub-folders inside amidata
7)Now Open Ninjatrader 7 Control Center -> goto Historical Data Manager
8)Now Press Start Import button – > Now Select the exported Ninjatrader 7 ASCII file and press open button
9)Bingo you are done. You will get a alert Historical data imported successfully message from the data manager.
10)Now open the charts from the control center and enjoy!
13 Replies to “Export Amibroker Database to Ninjatrader EOD or 1min ASCII…”
i have one indicator of NT7/ MT4 that can automatically copy data from live market & save at your desired location with desired format(tic, csv) , one can import this data in any software but historically only
is there any way so that one can populate live data after setting local hard disk as a server
You can do that with some simple tweaks. Should not be a big deal.
i think above solution will works with one symbol one time
can i import historical data in batch/group.
lets say we have historical data in desired ninja trader format but in various folder . is it possible to import all data within different folder
Using AmiBroker Easy Quote Downloader – 3.12
but now not updating anything in AmiBroker…………
Having any server issues or deactivated the Third Party Services…….
Upgrade to the latest version of Amiquote Downloader.
Hi Rajendran,Thanks for the Afl.I see a difference in the candlesticks of imported data in Ninja trader and amibroker charts .Are you getting the same
I have discovered how to toggle between two databases. EOD toggle to intra. In one instance. File/Recent Databases/klick your choice.
Can you please update it for Ninjatrader 8?
How can we do it reverse?
If I have NT8 subscription, I want export data of several symbols and import it in Amibroker for analysis.
I can see data is written in C:\Users\abc\Documents\NinjaTrader 8\db\minute folder but dnt know how to import it in Amibroker.
Thanks in advance.
The above AFL code was very good, i am using it with NT8 ,
The above code was exporting data of whole database , if once i feel whole database in NT, than i need only fresh days database, which is not exporting like From Date (Time) – To Date (Time)
if i want only Last week data than it is not possible , every time it was exporting whole database
it is humble request to modify this code to export data for particular Date & Time
hello rajendra , thanks for sharing ur knowledge. i have tried exact way as u told , but i am getting an error “Unable to import file – Instrument is not supported by repository.”
can you help regarding this. thanks. waiting for reply.
Kindly modify the AFL to export a certain period data instead of whole data of any symbol, I tried changing date periods in analyser but it export entire data. Thanks in advance
Hi, Can you please update it for Ninjatrader 8 format