I found it by myself:
Create 2 variables:
int height 0
int width 0
And then a Custom MQL Block:
height=ChartGetInteger(0,CHART_HEIGHT_IN_PIXELS,0)-1;
width=ChartGetInteger(0,CHART_WIDTH_IN_PIXELS,0)-1;
Print("Height: "+height+" Width: "+width);
In MT4 and Windows 10 it needs a -1 to get the correct value. Others you have to test yourself.