This function will take a ch of the current chart. If you put it into an EA and activate it on each new bar, it must do what you desire. I am certain that somebody has done an EA - perform a search.

bool WindowScreenShot(string filename, int size_x, int size_y, int start_bar=-1, int chart_scale=-1, int chart_mode=-1)