Watch how to download trading robots for free
Find us on Twitter!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Views:
9721
Rating:
(50)
Published:
2017.11.03 12:29
\MQL5\Scripts\fxsaber\Expert\
ChartsClose.mq5 (0.29 KB) view
\MQL5\Include\fxsaber\
Expert.mqh (8.49 KB) view
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

The library can be connected using

#include <fxsaber\Expert.mqh>

All other files on this page provide examples/scenarios of library application; they are not needed for the operation of the library.


Features

// Is the Expert Advisor running on the appropriate chart?
bool EXPERT::Is( const long Chart_ID = 0 );

// Deletes the Expert Advisor form the appropriate chart
bool EXPERT::Remove( const long Chart_ID = 0 );

// Restarts the Expert Advisor on the appropriate chart
bool EXPERT::Reopen( const long Chart_ID = 0 );

// Retrieves data of the EA running on the appropriate chart
bool EXPERT::Parameters( const long Chart_ID,    
                         MqlParam &Parameters[], // Path to the EA and values of its input parameters
                         string &Names[] );      // Names of input parameters

// Launches the EA on the appropriate chart
bool EXPERT::Run( const long Chart_ID,    
                  MqlParam &Parameters[] ); // Path to the EA and values of its input parameters


Example

The library use examples/scenarios are attached to the description.

  • ExpertsRemove.mq5

    // Removes from all charts running Expert Advisors
  • ExpertsReopen.mq5

    // Restarts running Expert Advisors
  • ChartsClose.mq5

    // Closes all charts, on which there are no Expert Advisors (convenient for VPS)
  • ExpertLoader_Example.mq5 (in the source file, you can see how the Expert Advisor is launched, as well as how the script starts itself as an EA)

    // Starts an Expert Advisor with specified parameters
  • ExpertsChange_Example.mq5

    // Restarts running Expert Advisors and changes their input parameters

The above examples are the simplest scenarios of library use. It can also be useful in the development of various control panels, from which charts/Expert Advisors are managed, etc.

For a better understanding of how to use the library, here is a short source code:

// Starts an Expert Advisor with specified parameters
#include <fxsaber\Expert.mqh>

void OnStart()
{
  MqlParam Params[2];
  
  // Path to the Expert Advisor
  Params[0].string_value = "Experts\\Advisors\ExpertMACD.ex5";

  // The first input parameter of the Expert Advisor
  Params[1].type = TYPE_STRING;
  Params[1].string_value = "Hello World!";

  // Launching the Expert Advisor on the new chart
  EXPERT::Run(ChartOpen(_Symbol, _Period), Params);
}

Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/19003

ColorPsychological ColorPsychological

The Psychological indicator implemented as a color histogram, featuring alerts, push and email notifications.

MASi_WaveHist MASi_WaveHist

This is an implementation of the market cycle indicator described by Raghee Horner.

History Deals and Orders History Deals and Orders

The 'History Deals and Orders' script shows absolutely all properties of deals and orders from the trading history over a given time interval.

Pending orders UP Pending orders UP

The scripts places multiple pending orders higher than the current price.