Demo to stream Excel XLQ forex data into Matlab via FREE Yahoo Finance

(Last Updated On: April 7, 2015)

Demo to stream Excel XLQ forex data into Matlab via FREE Yahoo Finance

This is pretty awesome and very very flexible but powerful for lazy people like me

Instructions :
Record your Excel macro
https://support.office.com/en-sg/article/Create-or-delete-a-macro-f3eb0fa3-4c18-498a-9235-c66ba8e78149

Start MATLAB from within the Excel Add in (see next link but can be automated)

http://www.mathworks.com/help/exlink/add-in-setup.html#bsu1116-1

Work with the Microsoft Visual Basic Editor
To enable Spreadsheet Link EX as a Reference in the Microsoft Visual Basic® Editor:
1. Open a Visual Basic session.
• If you are running Excel 2003, select Tools > Macro > Visual Basic Editor.
• If you are running Excel 2007 and later, click the Visual Basic button on the Developer tab, or press Alt+F11.
Note: For instructions about displaying the Developer tab, see Excel Help.
2. In the Visual Basic toolbar, select Tools > References.
3. In the References — VBA Project dialog box, select the SpreadsheetLinkEX or SpreadsheetLink2007_2010 check box.
4. Click OK.

VBA Code under Developer-Edit macro with automated scheduling every x seconds with refresh!:

Sub FXUpdateMatlab()
'
' FXUpdateMatlab Macro
' This runs FX check on list to populate into MATLAB

‘run every x seconds with refresh ozgrid.com/forum/showthread.php?t=77908
Application.OnTime Now + TimeValue(“00:00:10”), “FXUpdateMatlab”

ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
Sheets(“Currency”).Select
Range(“A6:C13”).Select
MLPutMatrix “a”, Range(“A6:C13”) ‘http://www.mathworks.com/help/exlink/work-with-matlab-functions-in-microsoft-excel.html#bq8llit-1

ActiveWorkbook.RefreshAll

End Sub

Schedule the Macro to automatically run every x seconds or minutes via
http://www.ozgrid.com/forum/showthread.php?t=182559
http://stackoverflow.com/questions/24129613/using-excel-vba-macro-to-be-run-through-windows-schedule-task

Join my FREE if you are interested in learning other tricks with Matlab and Excel

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!
This entry was posted in Matlab and tagged , , , , , , , , , on by .

About caustic

Hi i there My name is Bryan Downing. I am part of a company called QuantLabs.Net This is specifically a company with a high profile blog about technology, trading, financial, investment, quant, etc. It posts things on how to do job interviews with large companies like Morgan Stanley, Bloomberg, Citibank, and IBM. It also posts different unique tips and tricks on Java, C++, or C programming. It posts about different techniques in learning about Matlab and building models or strategies. There is a lot here if you are into venturing into the financial world like quant or technical analysis. It also discusses the future generation of trading and programming Specialties: C++, Java, C#, Matlab, quant, models, strategies, technical analysis, linux, windows P.S. I have been known to be the worst typist. Do not be offended by it as I like to bang stuff out and put priorty of what I do over typing. Maybe one day I can get a full time copy editor to help out. Do note I prefer videos as they are much easier to produce so check out my many video at youtube.com/quantlabs