Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 06-23-2005, 05:51 PM   #1
Registered User
Join Date: Jun 2005
Posts: 6
Talking Livechart Stock Chart Program - check it out!


I like stock charts! They are neat and they display a LOT of data in an easy to read little space. A chart allows humans to visualize enormous amounts of data quickly and easily and lets the computer do all the thinking!

A LONG time ago I saw some great charting from quote.com when they use to have free livecharts with lots of little gizmos that you can put on it. They would update as the stock market moves. I thought it was awesome - but now livecharts is pretty weak and the only way to get those old charts is with Qcharts ($80/m !!!!) and they don't even have some great features like equivolume!! Whats that?!?!

Anyway - I decided to write my own charting program so that I could learn flash and have fun doing it! I wanted to see a nice equivolume (equicandle??) chart that I could read and didn't cost me anything or subscriptions and crap. The data is collected by downloading a csv table from yahoo.com (historical data once a day) and a simple webservice to grab the latest quote.

The chart actually grabs ENORMOUS data (about 5 - 6Kb) so that it can accurately calculate moving averages and unusual volume. The data is then passed through at least 4 loops (price scale calculations, candle drawing, moving average calculations, moving average drawing)

The benefits of it all is that the charts can be HUGE! I mean - nothing like you have ever seen gigantic (2000+ pixels wide and infinity high). It'll still have data and candles to display.

They also update in real-time like the old quote.com charts..

Great news is that the file size is small. The actual swf file is nothing more than a label component, some functions, and a movieclip of a dotted line.

Click here to check it out and tell me what you think!

Its a chart of AMAT (Applied Materials).. The highlighted candle means unusual volume (the highest volume candle of the data). The two averages are 26 day (red?) and 12 day (blue?). Together these averages make up MACD.. for those who know anything about stock charts and tech junk


Last edited by EmoMan; 06-23-2005 at 05:55 PM.
EmoMan is offline   Reply With Quote
Old 01-03-2008, 04:47 PM   #2
Registered User
Join Date: Dec 2007
Posts: 7
Question Stock chart

tried your link and got no permission. I do notice your post is two years ago.

Hear is my Question:

I am new to Flash but do have programming background. I am trying to create something like Yahoo Finance. Looked some ready-made tools like fusion chart but not exactly what I wanted so decided to learn Flash.

Q1: How do I draw the Candle? I can translate a price data (open, high, low, close) into in a box (rectangle) and two lines. i.e. I can loop through an array of price data and draw all the candles. But it seems to a little messy. Is there a better way.

Q2: I also want trap the mouse move event (just like Yahoo does) can the "this" (I don't know how to call it. Canvas? Stage? Frame?) listen to the mouse event?


Joh n
johnchen is offline   Reply With Quote
Old 01-03-2008, 07:17 PM   #3
Super Moderator
ASWC's Avatar
Join Date: Dec 2007
Location: Greenville, SC
Posts: 6,528

you can catch any mouse event with Flash. Just look at the documentation.
ASWC is offline   Reply With Quote
Old 01-05-2008, 10:58 PM   #4
Registered User
Join Date: Dec 2007
Posts: 7
Question Catch Mouse Move Event

OK, I tried the following:

this.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoving);
myButton.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoving);
function mouseMoving(e:MouseEvent):void

trace ("inside");


it workd for "myButton" (I see the trace.)

But "this" does not work. BTW, what is "this"? frame? stage? All I want to do get the mouse_MOVE event on the canvas.


johnchen is offline   Reply With Quote
Old 01-07-2008, 11:41 AM   #5
Senior Member
Join Date: Aug 2007
Location: NE Ohio
Posts: 520
Send a message via AIM to xwielder

You might want to post this question in the ActionScript 3 section of these forums. People there would probably be able to answer you more quickly.

xwielder is offline   Reply With Quote
Old 01-08-2008, 09:54 PM   #6
Registered User
Join Date: Dec 2007
Posts: 7
Smile Figured out

I am new to this and was not aware other sections.

Anyway, I figured out.

Just for people like me. Here is how.

use stage.addEventListener() instead of this.addEventListener()

to my surprise, the event is trigged even when mouse-moving on the child and the event's target is the child (display item). That is great so I don't need to add all the child to listen to the event.


johnchen is offline   Reply With Quote
Old 05-24-2008, 10:03 AM   #7
Join Date: Apr 2005
Posts: 54
Default ready to use solution

And how is it going?
I must say I spend almost a year to create something simmilar, you can check it here: http://www.amcharts.com/stock/
zeroin is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 12:25 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.