![]() |
| Discuss Tool to download months old NSE BhavCopy in one go at the Data Feeds within the Traderji.com - Discussion forum for Stocks Commodities & Forex; hi guys, I visited this site today itself and found it quite helpful for myself. ... |
|
|||||||
| Register | Blogs | FAQ | Chat Room | Search | Today's Posts | Mark Forums Read |
| Data Feeds Real time and end-of-day data feeds. |
|
Welcome to the Traderji.com - Discussion forum for Stocks Commodities & Forex. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please read the FAQ. |
![]() |
|
|
Thread Tools |
| Sponsored Links |
|
#1
|
|||
|
|||
|
hi guys,
I visited this site today itself and found it quite helpful for myself. I also installed MetaStock tool and wanted to gather some historic data which ofcourse is not always uptodate. So I quickly wrote a utility to download the set of 3 month old BhavCopies from NSE-India.com. (Thankfully MS quotes till 14-Jun are already available). Here I'm posting the simple C# Code which will download all the bhavcopies into your C:\NSE folder. I'm posting the code so you can tweak it according to your requirments. Code:
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
using System.Net.NetworkInformation;
using System.Diagnostics;
using System.IO;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string[] monthList = new string[3] { "JUN", "JUL", "AUG" };
try
{
Uri uri = new Uri(@"http://www.nse-india.com/content/historical/EQUITIES/2007/");
Uri tempUri;
foreach (string month in monthList)
{
WebClient client = new WebClient();
FileStream writer;
for(int i = 1; i <31; i++)
{
try
{
string iStr = (i <= 9) ? "0" + i.ToString() : i.ToString();
tempUri = new Uri(uri, month + "/cm" + iStr + month + "2007bhav.csv");
Debug.WriteLine("Downloading " + tempUri.ToString());
byte[] data = client.DownloadData(tempUri);
using (writer = File.Create(@"C:\NSE\cm" + i.ToString() + month + "2007bhav.csv"))
{
try
{
writer.Write(data, 0, data.Length);
}
finally
{
if (writer != null)
writer.Close();
}
}
}
catch (WebException ex)
{
if (ex.Status == WebExceptionStatus.ProtocolError && ex.Message.Contains("404"))
Debug.WriteLine("FileNotFound");
continue;
}
}
}
}
catch (Exception ex)
{
Debug.WriteLine("Failed");
}
}
}
}
Note - You will have to create the NSE folder in C drive manually. I'm also trying to write a CSV converter so that it will be easy to import from Downloader. If I get some time I'll post it in few hours. For any queries you can contact me at talksandy AT airtelbroadband.in |
|
#2
|
|||
|
|||
|
Hi flyingdeath,
It is asking for MSCOREE.DLL file. Where can I get it? |
|
#3
|
|||
|
|||
|
Install .net 1.0 or higher and it will work fine. Nice utility which solves the major problem. Now we must write a utility to convert CSV file to metastock format.
|
|
#4
|
|||
|
|||
|
Quote:
Link is http://www.traderji.com/software/596...se-bse-12.html Anyway I like command line tool that will do that automatically for me. So if anyone knows about the Downloader's command line option it will be very helpful. |
|
#5
|
|||
|
|||
|
Hi !
Please tell me where to get NSE data to use with metastock. I am new for this software. |
|
#6
|
|||
|
|||
|
Quote:
http://www.traderji.com/data-feeds/1...-database.html |
|
#7
|
|||
|
|||
|
Hearty thanks !
I think, I have found the right person who can guide me in using METASTOCK. ![]() |
|
#8
|
|||
|
|||
|
Quote:
![]() I recently started using this myself but I'm feelin comfortable with it. AmiBroker is good too and a lil bit more user friendly. Gotta go a long way before doing some serious stuff with it. |
|
#9
|
|||
|
|||
|
Quote:
I have got Amibroker now. Kindly help me in managing it. How to get historical data and how to update data ? Eagerly awaiting your friendly reply. ![]() |
|
#10
|
|||
|
|||
|
When I refer NSE bhavcopy there is a mix of EQ and BE series how do you people handle this.For example several entries of same date's data exist in NSE Bhavcopy what should I do to solve this problem.
|
| Sponsored Links |
|
|
![]() |
| Thread Tools | |
|
|
Similar Threads for: Tool to download months old NSE BhavCopy in one go
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Power IPOs will take six more months to light up | Robbie | Initial Public Offers (IPO's) | 0 | 25th November 2006 10:30 AM |
| 6 weeks , 6 months, 6 years . . . | mohdbinhaid | General Chit Chat | 0 | 9th June 2006 07:33 PM |
| 5 mins intraday data dor 2 months | tanewbie | Data Feeds | 47 | 18th March 2006 03:19 PM |
Indemnity, Disclaimer & Disclosure
Notice:
• By visiting Traderji.com you indicate your acceptance of our Forum
Rules Disclaimer & Disclosure and indemnify Traderji.com, its
associates and related parties of all claims howsoever resulting from
the usage of the forum.
• Disclaimer: Trading or investing in stocks & commodities
is a high risk activity. Any action you choose to take in the markets
is totally your own responsibility. Traderji.com will not be liable for
any, direct or indirect, consequential or incidental damages or loss
arising out of the use of this information.
• Disclosure: The information in this forum is neither an offer
to sell nor solicitation to buy any of the securities mentioned herein.
The writers may or may not be trading in the securities mentioned.
• All names or products mentioned are trademarks or registered trademarks of their respective owners.
General Content Disclaimer Notice:
In light of our policy of encouraging candid, open exchanges of views and the rapid distribution of information originating from many sources, Traderji.com cannot determine the accuracy of information that may be uploaded to the forum. Opinions, advice and all other information expressed by participants in discussions are those of the author. You rely on such information at your own risk. You are urged to seek professional advice for specific, individual situations and not rely solely on advice or opinions given in the discussions. Since Traderji.com is an open and free discussion forum, any comments made by members of this forum in their posts reflect their own views and not of the owner or administrator of Traderji.com. Thus the owner/administrator indemnify themselves of all claims whatsoever and will not be liable or responsible for any members comments/views in this forum Traderji.com. If you find any objectionable or offensive posts made by members of this forum which you would like to bring to our notice for removal then please Contact Us.