Is there a way to get (X,Y) of middle mouse click? The (X,Y) should be relative to the chart rather than relative to the whole canvas.
I see a code from a customized indicator (TraderRuler specific) that uses the following logic:
cursor.clickPrice = ((double)(ChartControl.CanvasBottom) - (double)(yPix))/((double)(ChartControl.CanvasBottom)-(double)(ChartControl.CanvasTop));
It is great if no pane indicators. However, if there is indicator at the bottom, then the above click price would be off as CanvasBottom coordinate is below indicator pane and the mouse click is relative to CanvasBottom.
Comment