How convert time/price coordinates to screen coordinates and viceversa?

 

Hello everybody,

I'm playing with CANVAS functions.

I have to transform X time/ Y price coordinates  into X/Y screen coordinates and viceversa.

Any  pre-built function or I have to write a windows/viewport conversion function?


Thanks

 
ChartTimePriceToXY
ChartXYToTimePrice

Reason: