Trend Monitor for MT4

TopicStarter

Moderator
Apr 15, 2024
10,076
4
38

Introduction​


Trend Monitor for MT4 is a trading robot designed to analyze market trends and assist traders in making informed decisions. With mixed reviews and a notable average rating of 4.44, it has gained attention in the trading community. Let’s break down how to install, configure, and improve this trading robot based on our experience.

Installation and Configuration​


If you're looking to get started with Trend Monitor for MT4, follow these steps:


  • 1. Download the robot from the official website: Trend Monitor for MT4.
    2. Locate the MT4 directory. Within MT4, navigate to File > Open Data Folder.
    3. In the data folder, go to MQL4 > Experts, and paste the downloaded .ex4 file.
    4. Restart MT4 and activate the EA by finding it in the Navigator panel.
    5. Drag the EA onto the desired chart.
    6. Configure the EA settings according to your preferences and market conditions.

Experience with Trend Monitor for MT4​


Based on user reviews:

- Thank you, it's very accurate - , we found that accuracy is decent, but there are always exceptions.
- [I]👌👌👌👌, пользуюсь. Но на платформу чувствуется нагрузка.[/I] - [USER=sei-bert], the robot does indeed put some load on MT4.
- [I]Very helpful[/I] - [USER=Valentin Butorin], assistance is visible, yet it’s prudent to not rely solely on this EA.

In our tests, we noticed that while Trend Monitor offers good insights, it doesn’t replace a well-thought-out strategy. For optimal performance, constant tweaking and monitoring are necessary.

[HEADING=2]Tips for Improvement[/HEADING]

For better results with Trend Monitor for MT4, consider the following tips:

[LIST]
1. [B]Regular updates[/B]: Stay updated with the latest version of the EA.
2. [B]Backtesting[/B]: Always backtest new settings on historical data before applying them to live trades.
3. [B]Combining indicators[/B]: Use additional indicators to confirm signals.
4. [B]Risk management[/B]: Utilize proper risk management techniques to safeguard your capital.
5. [B]Customize settings[/B]: Tailor the settings based on the current market conditions rather than relying on default configurations.
[/LIST]

[HEADING=2]Source Code of Trend Monitor for MT4[/HEADING]

We don’t have access to the original source code of Trend Monitor for MT4. However, based on the description provided on the MQL5 marketplace, we can create a code that mimics its functionality. Note that our version is an example built by [B]EASY Trading Team[/B] and isn't an exact replica.

[CODE]mql5
//+------------------------------------------------------------------+
//| TrendMonitor.mq5|
//| Copyright 2024, Forex Robot EASY Team|
//| Website: https://forexroboteasy.com/ |
//+------------------------------------------------------------------+
#property strict

// Importing necessary libraries
#include <Trade\Trade.mqh>

// Creating instances of CTrade class
CTrade trade;

// Input parameters for technical indicators
input int maPeriod = 14; // Moving Average Period
input ENUM_MA_METHOD maMethod = MODE_SMA; // Moving Average Method
input ENUM_APPLIED_PRICE maAppliedPrice = PRICE_CLOSE; // Moving Average Applied Price

input int rsiPeriod = 14; // RSI Period
input int macdFastPeriod = 12; // MACD Fast Period
input int macdSlowPeriod = 26; // MACD Slow Period
input int macdSignalPeriod = 9; // MACD Signal Period

input int bollingerBandsPeriod = 20; // Bollinger Bands Period
input double bollingerBandsDeviation = 2.0; // Bollinger Bands Deviation

input int stochasticKPeriod = 14; // Stochastic Oscillator K Period
input int stochasticDPeriod = 3; // Stochastic Oscillator D Period
input int stochasticSlowing = 3; // Stochastic Oscillator Slowing

// Custom strategy input parameters
input double riskPercentage = 1.0; // Percentage risk per trade
input double maxDailyRiskPercentage = 5.0; // Maximum daily risk percentage
input double maxDrawdownPercentage = 20.0; // Maximum drawdown percentage

// Global variables for tracking
double startBalance = 0.0;
double maxDrawdown = 0.0;
double dailyRisk = 0.0;

//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
// Initializing global variables
startBalance = AccountInfoDouble(ACCOUNT_BALANCE);
maxDrawdown = 0.0;
dailyRisk = 0.0;

// Return initialization status
return(INIT_SUCCEEDED);
}

//+------------------------------------------------------------------+
//| Expert deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
// Cleanup code can be added here if necessary
}

//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
{
// Check drawdown protection
if (GetDrawdownPercentage() > maxDrawdownPercentage)
{
Print(Maximum drawdown exceeded. Disabling trading.);
return;
}

double currentBalance = AccountInfoDouble(ACCOUNT_BALANCE);
double currentRisk = (startBalance - currentBalance) / startBalance * 100.0;
dailyRisk += currentRisk;

if (dailyRisk > maxDailyRiskPercentage)
{
Print(Maximum daily risk exceeded. Disabling trading.);
return;
}

// Perform market analysis and trade if conditions are met
PerformMarketAnalysisAndTrade();
}

//+------------------------------------------------------------------+
//| Perform market analysis and execute trades |
//+------------------------------------------------------------------+
void PerformMarketAnalysisAndTrade()
{
// Fetching OHLC data
double open, high, low, close;
GetOHLCData(0, open, high, low, close);

// Calculate indicators
double maValue = iMA(Symbol(), 0, maPeriod, 0, maMethod, maAppliedPrice, 0);
double rsiValue = iRSI(Symbol(), 0, rsiPeriod, maAppliedPrice, 0);
double macdMain, macdSignal;
iMACD(Symbol(), 0, macdFastPeriod, macdSlowPeriod, macdSignalPeriod, maAppliedPrice, macdMain, macdSignal, 0);

double upperBand, lowerBand, middleBand;
iBands(Symbol(), 0, bollingerBandsPeriod, bollingerBandsDeviation, 0, maMethod, maAppliedPrice, upperBand, middleBand, lowerBand, 0);

double kValue, dValue;
iStochastic(Symbol(), 0, stochasticKPeriod, stochasticDPeriod, stochasticSlowing, MODE_MAIN, 0);

// Example of a custom strategy
// Buy Signal: Close price is above MA and RSI > 50
// Sell Signal: Close price is below MA and RSI < 50
if (close > maValue && rsiValue > 50)
{
double lotSize = CalculatePositionSize();
trade.Buy(lotSize);
}
else if (close < maValue && rsiValue < 50)
{
double lotSize = CalculatePositionSize();
trade.Sell(lotSize);
}
}

//+------------------------------------------------------------------+
//| Fetch OHLC data |
//+------------------------------------------------------------------+
void GetOHLCData(int shift, double &open, double &high, double &low, double &close)
{
open = iOpen(Symbol(), 0, shift);
high = iHigh(Symbol(), 0, shift);
low = iLow(Symbol(), 0, shift);
close = iClose(Symbol(), 0, shift);
}

//+------------------------------------------------------------------+
//| Calculate position size based on risk |
//+------------------------------------------------------------------+
double CalculatePositionSize()
{
double riskAmount = AccountInfoDouble(ACCOUNT_BALANCE) * riskPercentage / 100.0;
double pipRisk = SymbolInfoDouble(Symbol(), SYMBOL_TRADE_TICK_SIZE); // You need to update this for actual strategy
double lotSize = riskAmount / pipRisk;

// Adjust for market lot step size
double lotStep = SymbolInfoDouble(Symbol(), SYMBOL_VOLUME_STEP);
lotSize = NormalizeDouble(lotSize / lotStep, 0) * lotStep;
return lotSize;
}

//+------------------------------------------------------------------+
//| Calculate current account drawdown |
//+------------------------------------------------------------------+
double GetDrawdownPercentage()
{
double drawdown = (startBalance - AccountInfoDouble(ACCOUNT_EQUITY)) / startBalance * 100.0;
if (drawdown > maxDrawdown)
maxDrawdown = drawdown;

return(maxDrawdown);
}
[/CODE]

[HEADING=2]Download Trend Monitor for MT4 - Your Ultimate Guide[/HEADING]

To download and get started with Trend Monitor for MT4, head to the [URL=https://forexroboteasy.com/trading-robot/trend-monitor-for-mt4/]official download page here[/URL].

Got any questions? Feel free to ask about the code or its functionalities. Remember, EASY Trading Team only provides an example robot based on the available description and is not engaged in selling the Trend Monitor for MT4.