Fibonacci Tools - Trendline

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
ronaldohp
Newbie
Newbie
Posts: 6
Joined: Wed Oct 21, 2009 12:00 am

Fibonacci Tools - Trendline

Post by ronaldohp » Sun Nov 08, 2009 12:23 pm

Hi Guys,


1 - I want to get one or both of the extrems points of the trendline fibonacci tool and drag them to another point(X,Y) and
while I drag the mouse the fibonacci lines will be drawed;

2 - I would like too create another style of Fibonacci, adding the straight line in the set Fans and Arch;

3 - Or simply, when I'll trace a trendline on a chart, the lines of fibonacci wil be drawn simultaneously (and the user chose between tree types os styles: arch, fans and straight)

Sorry my basic knowledge of Delphi. But I tryed to draw a simple line in the teechart. But when I`ll draw other line, the last line desapear. If I know how to trace a line, select it, remove it, I guess I'll draw the fibonacci lines (straight), using then fibonacci formula.

Some help will be much usefull

Thanks
RonaldoHP

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Fibonacci Tools - Trendline

Post by Yeray » Wed Nov 11, 2009 9:51 am

Hi Ronaldo,
ronaldohp wrote:1 - I want to get one or both of the extrems points of the trendline fibonacci tool and drag them to another point(X,Y) and
while I drag the mouse the fibonacci lines will be drawed;
I'm afraid that there is no property or tool to do that, so you should do it yourself probably using OnMouseDown and OnMouseMove events. You could check if the mouse was clicked down in a point near one of the trendline's extrems and change it extrem position everytime the mouse is moved looking for the nearest point on the series from the mouse position.

Here you have simple example you can start with. It uses a radio button to determine if the start or the end points of the fibonacci tool have to be changed and it is moved to the close value in the point that is clicked.
change fibo.zip
(1.52 KiB) Downloaded 286 times
ronaldohp wrote:2 - I would like too create another style of Fibonacci, adding the straight line in the set Fans and Arch;
Do you mean the Fibonacci Retracement? The Fibonacci Retracement is a new feature implemented for the next TeeChart VCL v9.
ronaldohp wrote:3 - Or simply, when I'll trace a trendline on a chart, the lines of fibonacci wil be drawn simultaneously (and the user chose between tree types os styles: arch, fans and straight)
I'm not sure to understand you here. Are you drawing a line or do you mean the line drawn by the fibonacci tool? Could you explain what are you trying to do here?
ronaldohp wrote:Sorry my basic knowledge of Delphi. But I tryed to draw a simple line in the teechart. But when I`ll draw other line, the last line desapear. If I know how to trace a line, select it, remove it, I guess I'll draw the fibonacci lines (straight), using then fibonacci formula.
To draw a line directly to the canvas, using Chart's canvas' functions, you should draw them at OnAfterDraw event. That means that each time the chart is redrawn, they are cleared so they have to be drawn again.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply