Page 1 of 1

Fibonacci Tools - Trendline

Posted: Sun Nov 08, 2009 12:23 pm
by 10554474
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

Re: Fibonacci Tools - Trendline

Posted: Wed Nov 11, 2009 9:51 am
by yeray
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 285 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.