Skip to content

ForexRobotEasy/PRO-Macd-Predictor-MT5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

PRO Macd Predictor MT5

This is the code for the PRO Macd Predictor MT5 indicator, developed by the Forex Robot Easy Team. This indicator calculates and displays the Moving Average Convergence Divergence (MACD) values on the chart. It also provides buy and sell signals based on the MACD line crossing the signal line.

How it works

The indicator uses the iMACD function from the MovingAverages library to calculate the MACD values. The input parameters for the MACD calculation are defined at the beginning of the code, including the fast MA period, slow MA period, signal line period, moving average method, and applied price.

The MACD values are then stored in three buffers: macd_buffer, signal_buffer, and main_buffer. These buffers are used to keep track of the MACD line, signal line, and main line values respectively.

In the OnTick function, the current MACD values are calculated and stored in the buffers. The code then checks for line crossing and trend shifting by comparing the current MACD line value (macd_main) with the current signal line value (macd_signal), as well as the previous values stored in the buffers.

If the MACD line crosses above the signal line, it prints a 'Buy signal' message and triggers a buy order. Conversely, if the MACD line crosses below the signal line, it prints a 'Sell signal' message and triggers a sell order.

The code also analyzes the distance between the MACD Predictor line and the last price. If the distance is positive, it prints a message indicating that the trade has time to go in favor. If the distance is negative, it suggests that the trade may not go in favor. If the distance is zero, it prints a message indicating that the distance is zero.

The OnStart function is the entry point of the program and calls the OnInit and OnTick functions to initialize the trade functions and execute the indicator logic.

Product Description

The PRO Macd Predictor MT5 is a powerful indicator developed by the Forex Robot Easy Team. It utilizes the Moving Average Convergence Divergence (MACD) to provide precise price predictions and generate buy and sell signals.

With its customizable input parameters, including fast MA period, slow MA period, signal line period, moving average method, and applied price, users can adapt the indicator to their trading strategy and preferences.

The indicator calculates the MACD line, signal line, and main line values and visually displays them on the chart. It also alerts traders when the MACD line crosses above or below the signal line, indicating potential buying or selling opportunities.

Additionally, the indicator analyzes the distance between the MACD Predictor line and the last price, providing insights into the trade's potential favorability.

For detailed reviews and trading results of this product, please visit Forex Robot Easy. Please note that ForexRobotEasy is not the official developer of this product. We only provide sample code that can work as described in this product. To find the official developer of this product, please use MQL5.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published