Get mouse position on strategy tester

 

Hi!

I'm trying to get a mouse click position on chart using OnChartEvent()

It work's fine on a "real chart", but when I try to do the same at strategy tester, doesn't work ... 


void OnChartEvent(const int id,         // event ID  
                  const long& lparam,   // event parameter of the long type
                  const double& dparam, // event parameter of the double type
                  const string& sparam) // event parameter of the string type
{  
   
        int subwindow;
        double price;
        datetime time;

        if(id==CHARTEVENT_CLICK){  
                ChartXYToTimePrice(0, lparam, dparam, subwindow, time, price);
        }
}


So I get these vars to create some objects...


I've read on some topics that I could do it with some DLL, but I couldn't, can anyone help me? Thanks!

 

On MetaTrader 5, the Strategy Tester only supports processing custom events on EAs (not Indicators), but nothing else.

On MetaTrader 4, the Strategy Tester does not support the OnChartEvent() at all.