MQL4 HOW-TOs (switch chart window-attach EA to chart-Database interaction)

 
Greetings to all. I have a few questions regarding MetaTrader functionalities through MQL4.

I want to know if it is possible to programaticaly switch to a specific opened chart window, other than the currently showed one.

Also I've been looking for a way to attach an Expert Advisor to a chart from a script or other MQL4 program.

Finally what would be the best way to integrate MQL with any Data Driven language such as ADO or SQL? Is ther a way to include C++ code or any other similar language into MQL4?

Thank you for any help you can provide me on these topics.
Luis Reyna
 
lreyna wrote:
I want to know if it is possible to programaticaly switch to a specific opened chart window, other than the currently showed one.
Sorry, this is impossible.

Also I've been looking for a way to attach an Expert Advisor to a chart from a script or other MQL4 program.
This is impossible too. Please use DLLs for this.

Finally what would be the best way to integrate MQL with any Data Driven language such as ADO or SQL? Is ther a way to include C++ code or any other similar language into MQL4?

You can create DLL files in any high-level programming language.

You can study our examples in the client terminal folder:
/MetaTrader 4/experts/samples/DllSample/ - VC++6.0 source code of a DLL example,
/MetaTrader 4/experts/samples/include/sampledll.mqh - a header file,
/MetaTrader 4/experts/samples/libraries/ExpertSample.dll - an external DLL file
/MetaTrader 4/experts/samples/ExportFunctions.mq4 - MQL4 expert advisor program.

Reason: