Metatrader has a custom symbol option which allows you to add custom datasets into MetaTrader 5 trading software.
Download MetaTrader 5:
First download MetaTrader 5 software from the MetaTrader official site. Then install it on your computer.
External Link:
You can download NSE, BSE, MCX Equity data from Yahoo Finance for FREE.
https://in.finance.yahoo.com/
Download NSE stock data:
First, open the yahoo finance India page with the above link. Then in the search bar type the NSE BSE or MCX stock symbol name. It will show all stock exchange date for that selected stock symbol.
With the picture below for CIPLA, CIPLA is listed in many stock exchange including BSE and NSE. So here we will only select the NSE.

After opening the TCS.NS page, it will show 3 options to download the CSV data with your preferred choice.

Edit CSV Data for Metatrader import:
Metatrader has a different setup for importing custom data into the trading platform. So we need to edit the data or rearrange it with MetaTrader bar data importing format.
Metatrader has the following format:
- DateTime
- Open
- High
- Low
- Close
- Tick volume
- Volume
- Spread
External Link:
So in our CSV file, we need to setup CIPLA data in that way.
Yahoo Finance data comes in the following format:
- Date
- Open
- High
- Low
- Close
- Adjusted Close
- Volume
Just we will add two extra columns “tick volumes”, “spread” with 0 (zero) value and remove “Adjusted Close”.
Changing DateTime format:
Yahoo Finance shows on date and in different format. But MetaTrader DateTime format is a bit different therefore we need to change it with the excel custom format option.
Select the cell or column then right click on it and from right click menu click on the “Format Cell”
option.

For MetaTrader we need to use following DateTime format:
Excel Format:
yyy.mm.dd hh:mm:ss

Now select the rest of the data in that column and repeat the above set. Insert two columns for “tick volume” and “spread” as shown below:

NOTE:
You need to sort the data with “Z to A” because by default Zerodha export stock into .csv file last to first. So you need to make the last date first then the current date last. Just reverse.
Save the file. Now our CSV file is completely ready to import into the MetaTrader custom symbol.
Import NSE stock data into MetaTrader:
Open MetaTrader 5 and press “Control + U” to open the symbols window. You can also open by right-clicking on the symbol from the market watch window.
There click on “Create custom symbol”.

Here you only need to add symbol name and keep everything as it is and save.

You can edit, add, delete any custom symbol, just right click on the symbol to open the menu.

Import data into a custom symbol:
Now only need to import data into that custom symbol, which you have created before.
Select the symbol then click on the bar from the symbol window (Control + U). Now click on “Import Bars”.

From the import bar window, browse and select your .csv file then with the default setting click “Ok”. Check data if required.
Display chart window
Show the chart!
Your newly added custom symbol will be showing on the “Market Watch” section. From there right-click on it and from the right-click menu on “Chart window”. This will open the offline chart of the stock, in this case, TCS.

Now you can add custom indicators on this chart for your trade analysis.
Conclusion
In the beginning, it might feel like a complex process. But once you will do it. It will get easier. No such big deal plus its FREE. No monthly rental for using MetaTrader. You can use any custom or paid forex indicator on your favorite Indian stock. Also can do backtesting of your strategy with MetaTrader strategy tester.
Related link:
Metatrader Strategies
Need pro tips on the MetaTrader trading platform? So here you are with advanced strategies to move your forex trading, next to the success edge.
Next Article(s)
is it real time data?
You need to export real-time data from Zerodha Pi to Excel, then edit and upload it back to MetaTrader.
Open account for Zerodha Pi
https://zerodha.com/open-account?c=ZMPLDJ
As you will be trading equities, options, commodities from the broker, So the broker allows you to export the data for free. Therefore import that data into MetaTrader for NSE, BSE, MCX analysis.
Hope it clears.
IT WILL RUN REAL TIME DATA
i tried but it will not working.
we have to open demo account in mt5.
then run nse scripts in,all indian exchanges will work.
where i can find nse script?
From Zerodha Pi:
https://zerodha.com/open-account?c=ZMPLDJ
nse deta demo
Hello Dinesh,
NSE data are not demo, they are real time.
You can get NSE, BSE, MCX intraday stock data from Zerodha Pi.
https://zerodha.com/open-account?c=ZMPLDJ
After installing Pi from Zerodha. Please follow the video guide as shared in this article.
Regards
Do this work in live market and data gets processed in live market or only we can do back test only ?
You can use live market data for processing. It will not get updated automatically but manually you can do this with this method and its free. You can do the analysis and place trade later update the chart with new data and check status.
hi send me user id for demo, with atleast 1 year historical data for mt4 for nse futures, otherwise i cannot do backtesting
Hello, we do not sell historical data for mt4. This is blog is about how to do it by yourself! Data is available on Yahoo for free.