Message from Rajib
Hi Rajandran,
Thanks a ton!
It seems to be a big problem if these things don’t get fixed. All the indices are out of my charting software!
I can manage to write a VBA that will collate individual files and write it in the CSV. But I need something that will download the EOD text files for these indices into once place! That too me is more tedious than writing it on to the csv file.
Regards,
Rajib
Here is a initiative from me to automate the NSE EOD data in ASCII format using simple VBA Scipts in MS Excel. The following MS Excel VBA macro copies the Getbhavcopy zip file corresponding to 02Nov2010 from NSE India portal into your local drive(c:eoddata) and then extracts the Zip file and shows you the content in the csv file.
This is one of the primary requirment to develop the macro further. And for me its works fine and few more steps needs to be taken to design a Getbhavcopy Ascii
format downloader using MS EXCEL. And as of now its not for commercial use. The macro can be used only for testing/development purpose
[wp_ad_camp_5]
Pre-Requisite to run the macro
1)Create a Folder Name eoddata in C drive
2)Make Sure that you had added the Reference xzip.dll which is used to zip or unzip files
3)To install X-Zip.dll reference please visit and read the X-Zip.dll I.e X Standard – Zip 2.5 installation instructions
4)Make Sure that you had enabled the correct Macro security settings.
5)Download the MS Excel Containing the Macro
4)Go to Tools->Macro and Run the EODData Macro
Here is the VBA Macro Code
Private Declare Function URLDownloadToFile Lib “urlmon” Alias _
“URLDownloadToFileA” (ByVal pCaller As Long, _
ByVal szURL As String, _
ByVal szFileName As String, _
ByVal dwReserved As Long, _
ByVal lpfnCB As Long) As LongFunction DownloadFile(URL As String, LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then DownloadFile = True
End FunctionSub eoddata()
Dim sURL As String
Dim LocalFilename As String
Dim filename As String
Dim objZipConst UNC = “C:eoddata”
fname = “cm02NOV2010bhav.csv”
zipfilename = fname & “.zip”sURL = “http://nseindia.com/content/historical/EQUITIES/2010/NOV/” & zipfilename
LocalFilename = UNC & zipfilenameDebug.Print DownloadFile(sURL, LocalFilename)
Set objZip = CreateObject(“XStandard.Zip”)
objZip.UnPack LocalFilename, UNC
Set objZip = Nothing
Workbooks.Open filename:=UNC & fnameEnd Sub
Hope the complete solution will be soon available in our blog with free and open source VBA codes 🙂
Great Initiative ………
@ Rajendran,
Ooops … was busy in coding it … did not see this message and posted in the earlier post itself.
I have got it provided the text files are available to read. Assuming “Data Downloader” is working and volume problem will be sorted out soon … we can avoid the manual intervention. Even the indices format difference with GetBhavCopy is taken care of.
Let me know how I can share it.
Regards,
Rajib
@Rajib
I had invited you to post in marketcalls itself. Hope you had got the username and pwd. for any clarification mail me to [email protected] or [email protected]
Good Night!
sir, ril in cash below RS. 1080, what should be the strategy?
@Nanavathi
Charts are complex with Buy signal. Dont try to trade against the trends.
ok sir.
sir ,
i was going through nifty fut stocks on nma chart but could not find a single stock with desired results on daily as well as weekly basis , what should be the parameters if i want to go for a medium term pick , like the one picked by you few days back (ahmedabad…).
tx
@Jitin
NMA provides belated signals. When comparing to NMA, Ichimoku and 13-13 Wilders trading strategy are far better
Hello Sir,
Thanks a lot for VBA Script, but m looking for a script to download weekly NSE Futures Data. Is it possible to get weekly NSE Futures data through script or from anywhere…plz suggets
Regards,
TT
I have downloaded bhav copies from last 1 year. Now I want these scrips in weekly format. May I request you to help me out
the code is not working. also the link does not have the file available
Hi,
Its a old article and its a temporary solution available at that time and NSE has changed its download URL . Now try with Getbhavcopy EOD downloader to get ASCII files.