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

Re: Plotting Trend lines forward



PureBytes Links

Trading Reference Links

When you want to extend a trendline to a certain date beyond
the end of the chart (as per the last response) the
following approach will calculate the correct price:

plots0[ii] = TL_New(dd[0,ii],tt[0,ii],
newa,date,time,(BatC+CatC)/2);
TL_End = TL_GetValue(Plots0[ii],
LastCalcDate+ExtendLines,LastCalcTime);
TL_SetEnd(Plots0[ii],LastCalcDate+ExtendLines,LastCalcTime,T
L_End);

Note that I have only used daily data in this case but you
could extend the approach for intraday charts.

One trap is that you must have at least ExtendLines bars
displayed beyond the end of the chart (format window
command).

John