WindowScreenShot shifts the image

To add comments, please log in or register
Essam Daoud
Essam Daoud  


The code below is expected to take the screen shot of the chart window as is, but when I shift the chart window x number of bars, it still takes the image as if the chart is not shifted, It also shifts my custom indicator so that it does not align with the chart bars correctly, which is not showing.

Any idea how to take the screen shot as it appears on the screen?

Windows 10 pro laptop


void OnChartEvent(const int id,         // Event identifier  
                  const long& lparam,   // Event parameter of long type
                  const double& dparam, // Event parameter of double type
                  const string& sparam) // Event parameter of string type
//--- the left mouse button has been pressed on the chart
      if(!WindowScreenShot("shots\\" +Symbol() + ".gif",1536, 864)){
         Print("error: " + GetLastError());
original.PNG 76 kb
withCode.gif 24 kb
To add comments, please log in or register