+ Reply to Thread
Results 1 to 7 of 7

Real-time intraday data in excel

  1. #1
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2007
    Posts
    267

    Real-time intraday data in excel

    I have been using excel for a long time. But when it comes to programming and VBAs, I would say I am a novice. I am clear about what I want to do, but don't know how to go about it. Let me know if any of you can help me....

    The below link gives the realtime backfill data which most of the softwares are probably using it as a source for realtime datafeed

    http://www.google.com/finance/getpri...=1266701290218

    where

    q= stock symbol on Google finance
    x= exchange symbol
    i= interval (here 60 means 60 sec (1 minute interval))
    p= no of period(here 5d denotes 5 days of data)
    f= parameters (day, close, open, high and low)
    df= difference (cpct is may be in % change )
    auto =1,
    ts = time start… if you cut the last 4 digits…the rest gives the start day in seconds

    you can choose your own set of value depending upon your need.

    The following link gives the 1 min Realtime data for Nifty

    http://www.google.com/finance/getpri...&f=d,o,h,l,c,v

    Using the above explanation we can build any formats(1min,5min, 15min,hourly) of real time data and can be use as a backfill to feed charting softwares like Amibroker, Metastock, Ninja Trader etc

    To get 1 min Data
    http://www.google.com/finance/getpri...&f=d,o,h,l,c,v

    To get 5 min Data
    http://www.google.com/finance/getpri...&f=d,o,h,l,c,v

    to get 15 min Data
    http://www.google.com/finance/getpri...&f=d,o,h,l,c,v

    to get Hourly Data
    http://www.google.com/finance/getpri...&f=d,o,h,l,c,v

    Here is the link where the yahoo finance offers real time data updates in realtime in csv format at free of cost. http://www.marketcalls.in/amibroker/...data-feed.html

    I am trying to create a sheet so that I have to key in the scrip name in cell A1 and the duration (1 min / 5 min / 15 min / 60 min) in cell B1.

    I would need exactly 300 datapoints whether 1 min / 5 min / 15 min / 60 min.

    Then using VBA (which I want someone to help me) I should be able to get the data in Excel format on realtime basis..... the above links give the data in CSV...

    Finally the file should be designed in a way so that if I want real-time data for 50 - 100 stocks simultaneously, I should be able to get it.....

    The most important aspect is getting the data in excel and have it updated on realtime basis….

    Can this be managed????

    Thanks in advance....

    Cheers,
    Regards,
    Navin Agrawal

  2. #2
    Forum Contributor PingPing's Avatar
    Join Date
    02-19-2010
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    158

    Re: Real-time intraday data in excel

    Firstly, your data is not 'real-time'. It is 'delayed'. What you are actually asking to do is periodically refresh delayed data.
    Secondly - and more importantly - none of your (http) links appear to work, so it's difficult to see what you're actually asking for.
    Thirdly, you could look into the OnTime method of the Application object as the basis for building some code to periodically 'pull' data from Google.

  3. #3
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2007
    Posts
    267

    Re: Real-time intraday data in excel

    Maybe the following hyperlinks will help:

    http://www.marketcalls.in/database/g...fill-data.html

    http://www.google.com/finance/getpri...=1266701290218

    where

    q= stock symbol on Google finance
    x= exchange symbol
    i= interval (here 60 means 60 sec (1 minute interval))
    p= no of period(here 5d denotes 5 days of data)
    f= parameters (day, close, open, high and low)
    df= difference (cpct is may be in % change )
    auto =1,
    ts = time start… if you cut the last 4 digits…the rest gives the start day in seconds

    you can choose your own set of value depending upon your need.



    The following link gives the 1 min Realtime data for Nifty
    http://www.google.com/finance/getpri...&f=d,o,h,l,c,v

    Using the above explanation we can build any formats(1min,5min, 15min,hourly) of real time data and can be use as a backfill to feed charting softwares

    To get 1 min Data
    http://www.google.com/finance/getpri...&f=d,o,h,l,c,v

    To get 5 min Data
    http://www.google.com/finance/getpri...&f=d,o,h,l,c,v

    to get 15 min Data
    http://www.google.com/finance/getpri...&f=d,o,h,l,c,v

    to get Hourly Data
    http://www.google.com/finance/getpri...&f=d,o,h,l,c,v

    how to and from where to fetch intraday realtimedata feed using yahoo finance:
    http://chartapi.finance.yahoo.com/instrument/1.0/^nsei/chartdata;type=quote;range=1d/csv/

    Could you guide me on your suggestion: "Thirdly, you could look into the OnTime method of the Application object as the basis for building some code to periodically 'pull' data from Google."

    Thanks & Cheers,


    Quote Originally Posted by PingPing View Post
    Firstly, your data is not 'real-time'. It is 'delayed'. What you are actually asking to do is periodically refresh delayed data.
    Secondly - and more importantly - none of your (http) links appear to work, so it's difficult to see what you're actually asking for.
    Thirdly, you could look into the OnTime method of the Application object as the basis for building some code to periodically 'pull' data from Google.

  4. #4
    Forum Contributor PingPing's Avatar
    Join Date
    02-19-2010
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    158

    Re: Real-time intraday data in excel

    Try this in a standard module and watch the Immediate Window for the output:
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2007
    Posts
    267

    Re: Real-time intraday data in excel

    I opened a new spreadsheet

    Went to Developer on the Menu bar

    Opened Visual Basic

    Insert Module and pasted the above

    I went to macro, chose the Macro "TEST" and run...

    But I got an error "Cannot run the macro 'Book2!Sub2'. The macro may not be available in this workbook or all macros may be dissabled"

    All macros in this workbook hv been enabled by me but still this error occurs... Pls help

    Quote Originally Posted by PingPing View Post
    Try this in a standard module and watch the Immediate Window for the output:
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2007
    Posts
    267

    Re: Real-time intraday data in excel

    Hi PingPing

    not happening....

    will be highly obliged if you can make a sample spreadsheet and mail it to me....

    thanks & cheers,

    Quote Originally Posted by PingPing View Post
    Try this in a standard module and watch the Immediate Window for the output:
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-12-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Real-time intraday data in excel

    Check out this spreadsheet. It downloads intraday quotes from Google. It also transforms the weird Unix-based time stamp into a standard Excel date and time.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1