Topics
15 Feb 2021, 15:38
 983
 7
Replies

deknibar
20 Feb 2021, 14:45

Hi,

I would like rather not to share my code. But the indicator that does that correctly is the one mentioned before:

https://ctrader.com/algos/indicators/show/2302

Placing of the controls is not important. No matter if dragging the chart area or the axis, the indicator works the same way. When I do it with the axis, it is not quite the same.

It is not that bad, but if is achievable it would look much better.


@deknibar

deknibar
18 Feb 2021, 15:53 ( Updated at: 19 Feb 2021, 00:45 )

Hi,

I have a control within the chart area which is assigned to the price.

When the chart area is being dragged, the control is following the price correctly. Its position is being calculated on mouse move in real time. When dragging is being made with the price axis with the scrolling event, the control is following the price by jumping to the price like it was calculated  only on key points of the scrolling move.

I can't see any other event to handle the mouse move outside the chart area on each point of the move and I have seen an indicator that does that.

 

EDIT:

I have noticed that the chart area size changing event works the same way as the scrolling event.


@deknibar

deknibar
18 Feb 2021, 14:30

Hi, yes it works well with zooming, but it does not handle moving of the price axis .

I have been using scrolling event to manage that, but it doesn't calculate constantly like mouse move but only at key points of moves which makes any objects jump instead of moving.


@deknibar

deknibar
16 Feb 2021, 13:54

Okay, but possibly he won't reveal that to me.

Meanwhile, if you were able to know the way that has been done, I would appreciate any hint.

Thanks.


@deknibar

deknibar
16 Feb 2021, 13:34

Hi Panagiotis and thank you for your answer.

However the mentioned indicator doesn't use horizontal lines and neither the lines nor the objects are not interactive.

When the price marker is being clicked, its border is changing like it was being pressed.


@deknibar

deknibar
15 Feb 2021, 16:35

Hi,

I have had this free indicator installed:

https://ctrader.com/algos/indicators/show/2302

There is no source code available though.

I have been referring to the price.


@deknibar