PureBytes Links
Trading Reference Links
|
Gabriel,
No code to offer, only advice.
>Does anyone know the correct way to create an indicator that draws trend
>lines into the future. I use lt_new to create the trend line and that
>works fine, but tl_setextright only works sporadically. Sometimes when a
>new trend line is created, the old one is no longer extended.
I believe the old trendline doesn't get extended if the bars that
defined it scroll off the display. One way to get around this is
to keep track of all the trendline IDs, and on each new bar, read
the TL value at that bar and then set a new trendline endpoint
(TL_SetEnd I think) at that value. That way the value defining a
trendline will always be on the display.
>I wanted to quantify trend lines, but maybe it is better to calculate
>the slope and keep track of the values through arrays. Any advice will
>be appreciated.
You can do that, but if you calculate your own trendlines, make sure
you do it on log(price) instead of price. Usually tradestation
displays price charts in log scale (as it should), which means that
the trendlines, slopes, and extensions are actually being calculated
on log prices. Any new price read off the trendline is actually the
ExpValue of the internal trendline value.
--
,|___ Alex Matulich -- alex@xxxxxxxxxxxxxx
// +__> Director of Research and Development
// \
// __) Unicorn Research Corporation -- http://unicorn.us.com
|