How do I change MT4 color scheme programmatically

 
I want to teach my trading panel to change MT4 color scheme programmatically. 

I need to change background color, color of bars, etc (I already know how to change color of graphical objects). 

I couldn’t find how to do it. 

If it is not possible to do it in MQL4, then it should be possible using external DLL functions. But I don’t know where to search. 

Can you give me some hints?

Thanks!
 
 
William Roeder:
ChartApplyTemplate


Hi William, 

Thanks! But I need direct and detailed control. I found the solution - via ChartSetInteger. 

Reason: