Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Expert - MetaTrader 5 Library | MT5 EA Download - MetaTrader 5 Resources

author EAcpu | 6 reads | 0 comments |

The library can be connected using

 #include

All other documents on this page provide examples/scenarios for library applications; they are not required for the operation of the library.

 // Is the Expert Advisor running on the appropriate chart?
Boolean Expert Advisor::Yes( constant long chart ID = 0 ); // Remove Expert Advisor from the appropriate chart
Boolean Expert::Delete( constant long chart ID = 0 ); // Restart the Expert Advisor on the appropriate chart
Boolean Expert::Reopen( constant long chart ID = 0 ); // Retrieve data of the EA running on the appropriate chart
BooleanExpert ::arguments( constant long chart ID, 
Message parameters &parameters[], //The path of the EA and the values ​​of its input parameters string &name[]); //Input parameter names

// Launch the EA on the appropriate chart
booleanexpert ::run( const long chart id, 
Message parameters & parameters [] ); // The path of the EA and the values ​​of its input parameters


The description is accompanied by library usage examples/scenarios.

Expert delete.mq5

 // Remove from all charts where the Expert Advisor is running
  • Experts reopen.mq5

     // Restart running the EA transaction
  • Chart close.mq5

     // Close all charts without EA trading (very convenient for VPS)
  • ExpertLoader_Example.mq5 (in the source file you can see how the Expert Advisor is started and how the script is started as an EA)

     // Start EA trading using specified parameters
  • ExpertsChange_Example.mq5

     // Restart running the Expert Advisor and change its input parameters
  • The above example is the simplest library usage scenario. It can also be used to develop various control panels from which to manage charts/EAs, etc.

    To better understand how to use the library, here is a short source code:


    Attachment download

    📎 expertsremove.mq5 (0.43 KB)

    📎 expertsreopen.mq5 (0.43 KB)

    📎 chartsclose.mq5 (0.29 KB)

    📎 expertloader_example.mq5 (1.38 KB)

    📎 expertschange_example.mq5 (2.82 KB)

    📎 expertsaction.mqh (1.34 KB)

    📎 expert.mqh (8.49 KB)

    Source: MQL5 #19003

    Verification code Refresh