Watch how to download trading robots for free
Find us on Twitter!
Join our fan page
Join our fan page
You liked the script? Try it in the MetaTrader 5 terminal
- Views:
- 4638
- Rating:
- Published:
- 2017.01.19 16:56
- Updated:
- 2017.02.17 16:01
-
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
This Expert Advisor closes all positions if the total profit exceeds a predefined limit. In fact, this is a global take profit for all positions simultaneously.
//+----------------------------------------------+
//| Enumeration for profit calculation options |
//+----------------------------------------------+
enum TakeMode
{
ENUM_PERCENT, //profit in percentage
ENUM_CARRENCY //profit in the deposit currency
};
//+----------------------------------------------+
//| Input parameters of the EA indicator |
//+----------------------------------------------+
input TakeMode LMode=ENUM_PERCENT; //profit calculation method
input double TakeProfit=100.0; //take profit
//+----------------------------------------------+
//| Enumeration for profit calculation options |
//+----------------------------------------------+
enum TakeMode
{
ENUM_PERCENT, //profit in percentage
ENUM_CARRENCY //profit in the deposit currency
};
//+----------------------------------------------+
//| Input parameters of the EA indicator |
//+----------------------------------------------+
input TakeMode LMode=ENUM_PERCENT; //profit calculation method
input double TakeProfit=100.0; //take profit
//+----------------------------------------------+
Translated from Russian by MetaQuotes Ltd.
Original code: https://www.mql5.com/ru/code/16760

This Expert Advisor closes all positions if the total loss exceeds a predefined limit.

The indicator shows the price chart of any scaling level.

The MFI_Histogram_Round indicator with the timeframe selection option available in the input parameters.

The Expert Advisor is based on a standard trend strategy and the two-layer neural network that is trained to enter the market against a trend.