1 registered members (opm),
778
guests, and 4
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Downloading and Displaying Stock Market Data
#415134
01/14/13 11:19
01/14/13 11:19
|
Joined: Jan 2013
Posts: 11
DejaVu
OP
Newbie
|
OP
Newbie
Joined: Jan 2013
Posts: 11
|
Hello, I'm complete newbie in programming world, but I've chosen to create stock market database and the way to display those. This is my high school project, if I fail I'll fail my way to get into University. I really wanted to do everything on my own, but I've failed, I have tried some basic javascripts to find and download data off the website like google's stock market page. Then I have moved onto cURL, but again I couldn't get it working at first, when I've won with that it wasn't ideal because it was really hard to get around. Then I have found Zorro, I really want to use it, but I don't know how. Can anybody please help me in putting it into VSC++ and telling me how to save selected variables in the easy way for SQL use to create database? I tried some tutorials, but I can just put it all together, beside that I can't do anything sorry...
A name means nothing on the battlefield. After a week no one has a name.
|
|
|
Re: Downloading and Displaying Stock Market Data
[Re: jcl]
#415142
01/14/13 11:59
01/14/13 11:59
|
Joined: Jan 2013
Posts: 11
DejaVu
OP
Newbie
|
OP
Newbie
Joined: Jan 2013
Posts: 11
|
I was thinking of downloading currencies, prices of minerals(gold etc) and financial instruments, but I don't want to move on more than FXCM provides, it will be advanced enough, even too much, of course if it works.
Thanks for reply!
A name means nothing on the battlefield. After a week no one has a name.
|
|
|
Re: Downloading and Displaying Stock Market Data
[Re: jcl]
#415144
01/14/13 12:07
01/14/13 12:07
|
Joined: Jan 2013
Posts: 11
DejaVu
OP
Newbie
|
OP
Newbie
Joined: Jan 2013
Posts: 11
|
I wanted to create the database of downloaded data, so the database is being iteracted with, not the hole program. Next program will open the databse and display graphs, diagrams or basic tables of selected currencies/minerals etc. or all. Is that hard or would you recommend me different way?
EDIT: Display graphs, diagrams or basic tables of database of selected currencies/minerals etc or all of those
Last edited by DejaVu; 01/14/13 12:08.
A name means nothing on the battlefield. After a week no one has a name.
|
|
|
Re: Downloading and Displaying Stock Market Data
[Re: jcl]
#415149
01/14/13 12:33
01/14/13 12:33
|
Joined: Jan 2013
Posts: 11
DejaVu
OP
Newbie
|
OP
Newbie
Joined: Jan 2013
Posts: 11
|
I do know that, but it's a high school project, if you show how advanced it is, how you can use that stuff and be professional you'll get a lot of marks. Btw, I'll learn some side skills and can show the program I've build with the help I asked for and what skills I have learned bla bla bla.
But if you insist I'll stay with excel, but I still have to program it, can't use ready programs.
A name means nothing on the battlefield. After a week no one has a name.
|
|
|
Re: Downloading and Displaying Stock Market Data
[Re: DejaVu]
#415258
01/15/13 21:36
01/15/13 21:36
|
Joined: Jan 2013
Posts: 11
DejaVu
OP
Newbie
|
OP
Newbie
Joined: Jan 2013
Posts: 11
|
When I try to compile it, just as this page tells me to, I get this: 1>------ Build started: Project: FXCM TryFail TakeNo1, Configuration: Debug Win32 ------ 1> dllmain.cpp 1>c:\users\master roshi\documents\visual studio 2010\projects\fxcm tryfail takeno1\fxcm tryfail takeno1\trading.h(25): error C2146: syntax error : missing ';' before identifier 'time' 1>c:\users\master roshi\documents\visual studio 2010\projects\fxcm tryfail takeno1\fxcm tryfail takeno1\trading.h(25): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\users\master roshi\documents\visual studio 2010\projects\fxcm tryfail takeno1\fxcm tryfail takeno1\trading.h(25): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\users\master roshi\documents\visual studio 2010\projects\fxcm tryfail takeno1\fxcm tryfail takeno1\trading.h(30): error C2146: syntax error : missing ';' before identifier 'time_base' 1>c:\users\master roshi\documents\visual studio 2010\projects\fxcm tryfail takeno1\fxcm tryfail takeno1\trading.h(30): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\users\master roshi\documents\visual studio 2010\projects\fxcm tryfail takeno1\fxcm tryfail takeno1\trading.h(30): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\users\master roshi\documents\visual studio 2010\projects\fxcm tryfail takeno1\fxcm tryfail takeno1\trading.h(30): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\users\master roshi\documents\visual studio 2010\projects\fxcm tryfail takeno1\fxcm tryfail takeno1\trading.h(211): error C2146: syntax error : missing ';' before identifier 'timeStart' 1>c:\users\master roshi\documents\visual studio 2010\projects\fxcm tryfail takeno1\fxcm tryfail takeno1\trading.h(211): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 1>c:\users\master roshi\documents\visual studio 2010\projects\fxcm tryfail takeno1\fxcm tryfail takeno1\trading.h(211): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
A name means nothing on the battlefield. After a week no one has a name.
|
|
|
Re: Downloading and Displaying Stock Market Data
[Re: jcl]
#415295
01/16/13 18:59
01/16/13 18:59
|
Joined: Jan 2013
Posts: 11
DejaVu
OP
Newbie
|
OP
Newbie
Joined: Jan 2013
Posts: 11
|
As I've said, I've done all of those steps from this website, from the sections "Broker Plugin". What should I do next in order to solve problems and outline downloaded data? Okay, so how do I add on the compiled version of FXCM.dll?
A name means nothing on the battlefield. After a week no one has a name.
|
|
|
Re: Downloading and Displaying Stock Market Data
[Re: jcl]
#415325
01/17/13 13:04
01/17/13 13:04
|
Joined: Jan 2013
Posts: 11
DejaVu
OP
Newbie
|
OP
Newbie
Joined: Jan 2013
Posts: 11
|
That's complicated, what would you recommend me to do? I mean I did all that's recommended to do, can you give me some step-by-step tutorial of how to compile the program which will download the data and save it in good way to produce the database? What are .dll files used for?
EDIT: Please.
Last edited by DejaVu; 01/17/13 13:04.
A name means nothing on the battlefield. After a week no one has a name.
|
|
|
Re: Downloading and Displaying Stock Market Data
[Re: jcl]
#415373
01/17/13 20:32
01/17/13 20:32
|
Joined: Jan 2013
Posts: 11
DejaVu
OP
Newbie
|
OP
Newbie
Joined: Jan 2013
Posts: 11
|
Ok, I got to this: #include <iostream> #include <Windows.h> #include <conio.h>
using namespace std;
typedef int (*MsgFunction)(int);
HINSTANCE hinstDLL ;
int main() { MsgFunction MsgBox(0) ; hinstDLL = LoadLibraryA("FXCM.dll") ; if(hinstDLL != 0) { MsgBox = (MsgFunction)GetProcAddress(hinstDLL, "MsgBox"); } if(MsgBox == 0) { cout << "MsgBox is NULL \n"; }
int x = MsgBox(5); if(x == 5) { cout << "Message Displayed! \n" ; }
FreeLibrary(hinstDLL) ; return 0 ; getch() ; } Works, how do I call BrokerOpen function, because I get this after I try to run the file
A name means nothing on the battlefield. After a week no one has a name.
|
|
|
Re: Downloading and Displaying Stock Market Data
[Re: DejaVu]
#415410
01/18/13 09:10
01/18/13 09:10
|
Joined: Jul 2000
Posts: 27,977 Frankfurt
jcl
Chief Engineer
|
Chief Engineer
Joined: Jul 2000
Posts: 27,977
Frankfurt
|
For BrokerOpen you need a different function type: typedef int (*BROKER_OPEN)(char* Name,FARPROC fpError,FARPROC fpProgress); and then
BROKER_OPEN BrokerOpen = (BROKER_OPEN)GetProcAddress(h,"BrokerOpen");
if(BrokerOpen) {
char brokername[50] = "";
long version = (*BrokerOpen)(brokername,NULL,NULL);
}
You can see on the "Broker Plugin" page which functions you have and how they must be typedef'd. For your purpose you only need BrokerLogin, BrokerAsset, and BrokerHistory.
|
|
|
Re: Downloading and Displaying Stock Market Data
[Re: DejaVu]
#415415
01/18/13 11:15
01/18/13 11:15
|
Joined: Jan 2013
Posts: 11
DejaVu
OP
Newbie
|
OP
Newbie
Joined: Jan 2013
Posts: 11
|
#include <iostream> #include <Windows.h> #include <conio.h>
using namespace std;
typedef int (*MsgFunction)(int); typedef int (*BROKER_OPEN)(char* Name,FARPROC fpError,FARPROC fpProgress);
HINSTANCE hinstDLL ;
int main() { MsgFunction MsgBox(0) ; hinstDLL = LoadLibraryA("FXCM.dll") ; if(hinstDLL != 0) { MsgBox = (MsgFunction)GetProcAddress(hinstDLL, "MsgBox"); } if(MsgBox == 0) { cout << "MsgBox is NULL \n"; }
int x = MsgBox(5); BROKER_OPEN BrokerOpen = (BROKER_OPEN)GetProcAddress(hinstDLL,"BrokerOpen"); if(BrokerOpen) { char brokername[50] = ""; long version = (*BrokerOpen)(brokername,NULL,NULL); }
if(x == 5) { cout << "Message Displayed! \n" ; }
FreeLibrary(hinstDLL) ; return 0 ; getch() ; } I got problem with higlighted part, you wrote h but it didn't work, I have tried to put it into as a variable-didn't work, so I put hinstDLL and when I try to run it with FXCM.dll it gives me: "Message box is NULL". EDIT: When I keep it this way #include <iostream> #include <Windows.h> #include <conio.h>
using namespace std;
typedef int (*MsgFunction)(int); typedef int (*BROKER_OPEN)(char* Name,FARPROC fpError,FARPROC fpProgress);
HINSTANCE hinstDLL ;
int main() { MsgFunction MsgBox(0) ; hinstDLL = LoadLibraryA("FXCM.dll") ; if(hinstDLL != 0) { MsgBox = (MsgFunction)GetProcAddress(hinstDLL, "MsgBox"); } if(MsgBox == 0) { cout << "MsgBox is NULL \n"; }
int x = MsgBox(5); if(x == 5) { cout << "Message Displayed! \n" ; } BROKER_OPEN BrokerOpen = (BROKER_OPEN)GetProcAddress(h,"BrokerOpen"); if(BrokerOpen) { char brokername[50] = ""; long version = (*BrokerOpen)(brokername,NULL,NULL); }
FreeLibrary(hinstDLL) ; return 0 ; getch() ; } I get this: 1>------ Build started: Project: DLLtutApp, Configuration: Debug Win32 ------ 1> main.cpp 1>c:\users\master roshi\documents\visual studio 2010\projects\dlltutapp\dlltutapp\main.cpp(34): error C2065: 'h' : undeclared identifier ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Last edited by DejaVu; 01/18/13 18:32.
A name means nothing on the battlefield. After a week no one has a name.
|
|
|
Re: Downloading and Displaying Stock Market Data
[Re: jcl]
#415539
01/20/13 00:49
01/20/13 00:49
|
Joined: Jan 2013
Posts: 11
DejaVu
OP
Newbie
|
OP
Newbie
Joined: Jan 2013
Posts: 11
|
Okay, sorry, I thought it was ment to be added in. I'll work on it, as you've said, in terms of tutorials provided by website, is there everything I need?
A name means nothing on the battlefield. After a week no one has a name.
|
|
|
|