Download MetaTrader 5

ChartScreenShot Saving Bitmap Problem

To add comments, please log in or register

Hello Everyone hope all are fine.

I created two BUTTONS  for Take a ChartScreenShot. all the code is working very well . but i little problem.

  • BUTTON_1
First Button Call

string path = "Files\\Image_1.bmp"
      bool snapshot_1;
            snapshot_2 = ChartScreenShot(0,path,width/100*Chart_Width,height/100*Chart_Height,ALIGN_RIGHT);
                     if (ChartScreenShot(0,path,width/100*Chart_Width,height/100*Chart_Height,ALIGN_RIGHT))
                           Print("Image_1.bmp Saved Successfully! ");

  • BUTTON_2

string path_2 = "Files\\Image_2.bmp"
      bool snapshot_2;
            snapshot_2 = ChartScreenShot(0,path_2,width/100*Chart_Width,height/100*Chart_Height,ALIGN_RIGHT);
                     if (ChartScreenShot(0,path_2,width/100*Chart_Width,height/100*Chart_Height,ALIGN_RIGHT))
                           Print("Image_2.bmp Saved Successfully! ");

Both Button Commands working but problem is when i change Time-Frame Then BUTTON_2   save old captured image.

  • Mean's i take First  snapshot on M_15 Time-Frame to Click  BUTTON_1.
  • Second Snapshot on H1 Time-Frame to Click  BUTTON_2
But BUTTON_2 saving M_15 Time-Frame picture in " Image_2.bmp" . anybody can solve this issue ? 

Thanks Regard 

To add comments, please log in or register