dt and price are values of the selected point.
I want to get the latest date and price updated ????
You cannot draw a function, you can have a function that draws something.
If you just want a trendline, then you don't need chartTimePricetoXY, just draw a trendline and as the latest available point moves, use Object Move for the second (10 co-ordinate
how to take the last X and Y coordinate on the chart,
For example :
int x =(int)lparam; ///// ===> here I want to get the latest update of X |||
int y =(int)dparam; //// ====== > here I want to get the latest update of Y ||| get the updates while chart running
datetime CT =0;
double CP =0;