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

[amibroker] Re: Removing Trend Lines



PureBytes Links

Trading Reference Links

Hi,

> I wrote:
> > > If you have trouble removing a trend line, move the pointer's hotspot to
> > > an area below the trend line, then shift-click it.
> 
> > That's what is written in ReleaseNotes.txt (and .html).
> > Please, be so kind, and READ files that come with an update!
> 
> That was why I wrote to the list - so that everyone would know that the
> removal of trend lines doesn't work
> exactly as described or the way they worked in the past. The docs, in both the
> ReleaseNotes and the main guide's "What's New", have "click _over_ given trend
> line", but that isn't the way it works, at this time.
> 
> We need to click *below* the line, at least with the one's I tried to remove.
> This didn't depend upon the zoom, but I haven't checked that too much yet.

I think we have some misunderstanding here and I want to appologize everyone who
may understand me wrong.

The first thing is that AB uses a kind of the following formula to find if the mouse (x,y)
is over the trendline (x0,y0)-(x1,y1) (all coordinates are recalculated to screen pixels):

if( ( ( x0 < x && x <= x1 ) || ( x1 < x && x <= x0 ) ) &&
abs( y - ( y0 + ( ( y1 - y0 )*( x - x0 ) )/( x1 - x0 ) ) ) < 4 )
{
return dr;
}

In theory this should detect correct trendline if the pointer hotspot is +/- 3 pixels around the trendline.
But on Amiga you have "Pointer" preferences editor and there is a "Set Point" function.
This way you can set the hotspot anywhere and then theory fails.
Something that works on my machine some way will work differently on yours.

> If this *is* described in the docs, then I'm sorry, I missed it; and I did
> read both docs.
Donald, you always read the docs, and that's why you finally managed to remove the trendline :-)
I was addressing my words to the people who do not read the docs.
I am sorry that I didn't make it straight.

> Re: trend line wish list
> 
> Can you add a feature which *extends the time scale past the last quote"?
Yes, I can. Moreover I plan to implement "automatic trendline drawing" based
on zig-zag peak & trough detection.


> Also, if the trend lines had edit abilities, we could make small corrections
> without having to remove an old line. I don't know if the line's format can
> handle (you're allowed to chuckle, here) this or not, but, if they are
> vectors, they should. Right?

Trendlines are internally stored as vectors. In order to handle different scaling and
time frames (daily/weekly/monthly charts) x coordinate is stored as a date/time
and y coordinate is stored as a floating point value (price or indicator value).

Best regards,
Tomasz Janeczko
===============
Visit AmiBroker WWW Site at:
http://www.polbox.com/a/amibrok/
AmiBroker for Win32 site:
http://republika.pl/amibroker/ 
AmiBroker Mailing list:
http://www.eGroups.com/list/amibroker