[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do you write code to produce a new parallel trendline



PureBytes Links

Trading Reference Links

A question for the programming gurus :-)

I've been trying to write a program that draws a second copy of the Andrews
Babson BC line parallel to it but X bars into the future (where X = the
distance from A to the BC line.

Now, I can calculate the distance in bars.  And I can get the distance from
the center line to the B and C points along with the distance of B and C
from the center in bars.  The problem I have is that using TL_New I have to
put dates for the two points and when I add bars to the initial dates I get
affected by weekends which skews the trendline when I project into the
future.

Given that I know the bar number and price for B' along with the barnumber
and price of C' how can I either draw the trendline directly or work out the
date of those barnumbers.

Probably a silly question .... please help?

John