Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stock Ticker!

Status
Not open for further replies.

cyprus106

Programmer
Apr 30, 2001
654
I need to make a stock ticker in C++. Now Javas easy, but this is a whole different monster. I've searched all ove rhte web for examples or something. I have no idea where to start with this, yet I have to have it. anything anybody else has that could help??? (please)?

Cyprus
[noevil]
 
hum, I almost feel I shouldn't answer that question because if you have to ask, you'll never know.
But I will anyways...

A stock ticker is a constantly updating "pager" almost. It contains the names of some or all of the prices of stocks for companies. It's that marquee often seen at the bottom of large television news reports. AOL Instant Messenger comes with one. Some larger websites have them.
Making one is not that difficult, you just have to find a place to download the new information on stock prices.

Now do you know what I'm talking about? Cyprus
[noevil]
 
errr
how are u going to get the data?

u could redownload a web page into a String every so often, and if it has defining features extract the info
then update the page....
 
gee, thanks! I have the general theory of the program down, Now I need a code example. I need to know where to download the data and I need to know how. I don't know where to start and I seriously need to...

(Nothing personal LoneRanger... I got a kick out of your post) Cyprus
[noevil]
 
that would take a while.

I dont know what stock u want to look at, so I cant find a page....

and without that its kinda hard.

find a web page that displays the information u want and give me the link, ill have a look.
 
basically, all major stocks. For example, I could download real-time data from aol somwhere. I have the basic theory down, but the protocol gets me. I have to find a place to download it, find out how and i can take it from there. Cyprus
[noevil]
 
well
if its a website
use the NMHTTP property
->InputFileMode = False
->Get("THEURL");

String TheDocument;
String Info;
long Pos;
long Pos 2

TheDocument = NMHTTP->Body;

...Now if the file say contains this scource

&quot;<td>stockprice</td><td>12p</td></tr><tr><td>Info&quot;;

then...

Pos = TheDocument.Pos(&quot;<td>stockprice</td>&quot;);
Pos2 = TheDocument.Pos(&quot;</td></tr><tr><td>Info&quot;);

Info = TheDocument.SubString(Pos + 20,Pos2 - Pos + 19);

then u should have the stock price :)
 
I understood what you meant. [wink]

Now, if I could find a site that sends out the stock information. Does anyome know? Cyprus
[noevil]
 
that is what u wanted was it? can I clock this up as my first successful response to a question? :)
 
Well... it wasn't really helpful, and I'm no farther along than when I started. But since you were the only one that even tried, why not. Cyprus
[noevil]
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top