Events for chart objects

Created at 27 Feb 2024, 12:02
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
JO

JonathanKing

Joined 27.02.2024

Events for chart objects
27 Feb 2024, 12:02


My suggestion is to improve the bot/indicator ability to interact with objects on the chart. It would be good if the objects had at least a mousemove event where the status of the mouse buttons could be read in the argument.
It would be perfect if there was a full set of mouse handling events for each object on the chart:
mousemove
mouseup
mousedown
mouseenter
mouseleave

Simply put, when we drag an object on the chart, before we drop it, the program can perform some calculations for us, e.g. the distance from another point. This allows us to know exactly where/when to drop the object.

Additionally, textbox controls will have an endedit event, thanks to which the robot/pointer can only react when the final value is entered into the edit field.

Adding simple conversion functions would also be a big help:
ConvertTimeToX - convert time to X coordinate in pixels
ConvertXToTime - convert the X coordinate in pixels to time
ConvertPriceToY - convert price to Y coordinate in pixels
ConvertYToPrice - convert the Y coordinate in pixels to price


cTrader Automate
@JonathanKing