lineTo error while trying to graph

Bear with me, I new at this…I’m trying to create a stock graph. My method has been to use lineTo and moveTo to add graph segments to my movieclip stockGraph. stockGraph moves constantly along the X axis and does not vary on the Y axis. stockGraph is always positioned at 0. The new line segments are attached to stockGraph’s leftmost side (0 on the X axis) and go from 0 to -1 on the X axis – their Y points go up and down. When new line segments are added to stockGraph, stockGraphs X position becomes -1. stockGraph then moves itself back to 0 on the X axis.

Anyways, my code looks like this:
nextpointY = currentstockprice
moveTo(0, lastpointY)
lineTo(-1, nextpointY)
lastpointY = nextpointY
stockGraph._x += 1
Frame 2:

In the beginning the stockGraph movieclip is positioned at x=0;
The pen is positioned at x=0, y=the price quoted.

After the pen placement, a line is drawn from x=0 to x=-1 and y=the last price quote to y=the new price quote.

The pen draws a line to the newpoint from the old point (a distance -1 on the X axis) – This line becomes part of the stockGraph movieclip. With this new line attached, stockGraph is now positioned at x = -1;
With its new line now part of it, stockGraph moves itself back to 0;

Frame 2 sends the file back to frame 1 to start over.

Going back to frame 1, the pen is again positioned at 0 and what is now the old price quote. The previous point and is ready to draw a line to the next point.

My problem is that lineTo isnt permanently adding to stockGraph and it ends up blinking in the same place over and over.