MQL5 Algo Trading
388K subscribers
2.57K photos
2.57K links
The best publications of the largest community of algotraders.

Subscribe to stay up-to-date with modern technologies and trading programs development.
Download Telegram
Understanding the structure and workflow of an Expert Advisor (EA) in automated trading can significantly enhance your development process. Here's a brief breakdown:

1. Start with defining input parameters which configure the EA according to user preferences or strategy requirements.
2. Initialize local variables to manage and store runtime data efficiently during the EA operation.
3. The main code is divided into critical sections:
a. The initialization function sets up necessary components and verifies the trading environment.
b. The tick function is called on every new market tick and is crucial for responsive and dynamic trading actions.
- Within the tick function:
i. Signal calculations are performed to decide when and where to place orders.
ii. Volume calculations determine the size of the trading positions based on predefined risk management strategies.
...

Read more...
πŸ‘8πŸ‘2❀1
In the latest discussion on OpenCL technology, an issue was identified with MetaTrader 5's inability to employ GPU via OpenCL, specifically encountering an error coded 5114. This error hinders GPU selection for processes demanding elevated computation power. The built-in OpenCL support in MetaTrader 5, while detecting the GPU, fails to initialize consistent GPU usage. This persistent issue since 2013 affects a subset of MetaTrader users across various systems.

The initial workaround involves directly referencing GPU devices by ordinal number in MetaTrader's Journal tab, rather than using the intended flags for device selection. This makeshift solution sidesteps the error but is considered a temporary fix.

The proposed long-term solution involves a series of developmental phases, starting with a basic OpenCalibri test program that confirms feasible GPU usage, progressing through crea...

Read more...
πŸ‘4πŸ”₯3πŸ‘2
Forex Trade Manager MT5 facilitates the management of open orders on MetaTrader 5 by automating crucial functions. Upon opening a new order, it automatically configures Stop Loss and Take Profit settings. Additionally, it provides options for a Trailing Stop, which dynamically adjusts Stop Loss based on price movements, and a Break Even feature that adjusts Stop Loss to the open price after a set profit threshold is reached.

The tool allows for tailored control by managing orders either only for the active symbols or universally across all open orders. It also offers a 'Stealth Mode', wherein Stop Loss and Take Profit values are concealed from brokers, providing a layer of strategy invisibility.

Furthermore, the Forex Trade Manager includes settings for precision control:
- Stop Loss and Take Profit are adjustable in pips.
- The Break Even point can be activated after achieving a ce...

Read more...
πŸ‘11❀1πŸ‘1πŸ‘Œ1
In recent advancements in Expert Advisor (EA) technology, a comprehensive update has been executed on previously optimized systems, integrating results from two main project streamsβ€”geometry revisiting and neural network optimization. The use of MetaTrader 5 exclusively has allowed for more structured optimization without third-party dependencies.

A significant development is the amalgamation of optimization results into a single EA to streamline operations previously veiled by the necessity to manage numerous charts and EAs simultaneously. This integration uses both perceptron-based and neural network approaches, which have undergone rigorous forward tests over a one-year timeframe, from December 2021 to December 2022.

For implementation, a set of optimization and testing modes were applied, including "Open prices only" and "Complex Criterion max", with the latter showing more cons...

Read more...
πŸ‘6❀2πŸ‘2πŸ€”1
Forex Trade Manager Grid MT5 is an advanced tool designed to assist in managing forex orders conveniently. This tool enables users to initiate a trading cycle by placing a first order with a specified Take Profit. Once the EA (Expert Advisor) is executed, users can set a desired profit in pips through the provided parameters, and the EA will manage the positions to aggregate the set number of pips.

This strategy is particularly effective for manual trades on the current pair, employing a grid management approach. Positions are added between currently open trades at a chosen pip distance, supporting up to 15 trades. The initial three trades are managed with individual take profits; however, from the fourth trade onwards, the EA aims to close the entire grid at a common break-even level.

Crucial parameters for this EA include adding new trades at a defined pip distance from the last ...

Read more...
πŸ‘5πŸ‘5❀4
In the latest discussion on building effective Expert Advisors (EAs) for automated trading, it's crucial to focus on the design of order systems. The complexity of running multiple EAs, especially on accounts with a NETTING position accounting system, can lead to unintended interactions such as conflicting trades that could result in significant losses. Instead, using a HEDGING account allows for simultaneous buy and sell orders by different EAs without cancelling each other.

For robust EA functionality, it's essential to integrate specific functions that manage market price execution and order modification efficiently. This includes functionality for direct market entry and dynamic adjustment of order prices, critical for adapting to real-time market conditions.

Effective management of positions requires precise controls for closing or modifying trades, especially in volatile marke...

Read more...
πŸ‘Œ6❀2πŸ”₯2⚑1πŸ‘1
Understanding Moving Averages and Their Importance in Trading

Moving averages are crucial tools in trading, assisting in the smoothing of price data to reveal prevailing market trends. This less volatile representation helps investors identify more consistent patterns, providing a clear picture despite fluctuating market conditions.

Types of Moving Averages:
1. **Simple Moving Average (SMA)**: Calculates the average of a specific number of price points to determine a trend.
2. **Exponential Moving Average (EMA)**: Focuses more heavily on recent prices, making it more responsive to new information.
3. **Smoothed Moving Average (SMMA)**: Equally weights all values, useful for identifying longer-term trends.
4. **Linear Weighted Moving Average (LWMA)**: Also emphasizes recent prices, adjusting weights linearly, which can be beneficial for quick response to market changes.

These moving...

Read more...
πŸ‘8❀5πŸ‘3πŸ‘€1
In the realm of automated trading, two distinct Expert Advisors (EAs) have been developed to leverage price movements across a moving average for entry signals. However, their operational nuances differentiate their strategic approaches.

The first EA adheres to a conventional trading pattern without employing a recovery strategy. Its configuration allows for fixed input parameters including Moving Average Period (MAPeriod), lot size, take profit points (TPPoints), and stop loss points (SLPoints).

Contrarily, the second EA incorporates a Martingale strategy to increase the investment after losses. This model adjusts not only the lot size but also the profit taking and loss stopping parameters based on predefined multipliers. The rising stakes are capped at a maximum lot size to mitigate potential risks.

Both systems integrate key functionalities from the 'ImportantFunctions.mqh' fi...

Read more...
πŸ‘16πŸ‘1
Predicting future price movements is crucial for devising effective trading strategies. Current prediction models often do not adequately consider interactions among multiple agents, which can lead to the loss of critical data and suboptimal forecasts. The Multi-future Transformer (MFT) method, highlighted in the research paper "Multi-future Transformer: Learning diverse interaction modes for behavior prediction in autonomous driving," addresses this by decomposing multimodal future distributions into distinct unimodal components. This approach simplifies the simulation of varied interaction models between agents within a scene.

MFT operates by leveraging a neural network to generate forecasts in a deterministic fashion, enhancing reliability and repeatability. The method's architecture includes encoders for capturing dynamic and contextual states, a parallel interaction module to ex...

Read more...
❀11πŸ‘10πŸ‘2🀯1πŸ‘€1
Forex Trade Manager MT4 is designed to enhance the management of open orders on the MetaTrader 4 platform. This tool assists traders by automatically setting Stop Loss and Take Profit parameters once a new order is opened. It features dynamic mechanisms such as Trailing Stop, which adjusts the Stop Loss as the price moves to safeguard profits, and a Break Even function that moves the Stop Loss to the open price under certain conditions.

The manager is capable of controlling orders for symbols actively traded on or can manage all open orders across different symbols. Notably, it offers a Stealth Mode, which allows for the hiding of Stop Loss and Take Profit settings from brokers, thereby executing these orders programmatically based on the set parameters.

Forex Trade Manager MT4 provides a comprehensive set of parameters to customize trade management to fit various trading strategies...

Read more...
πŸ‘14❀8πŸ‘3πŸŽ‰3πŸ‘€2
Become a developer and earn on the Freelance!

In the Freelance section, community members are actively searching for experienced professionals to create custom Expert Advisors or indicators, test trading apps or perform other specialized tasks. Read more about how it works.

Turn your skills and expertise into profit. Register as a seller and start responding to orders – each task comes with a preliminary description and proposed budget, allowing you to quickly determine if the order suits your interests.

All payments between developers and customers are secure, negotiations are anonymous, and arbitration is available to resolve disputes. Register in just a few minutes by verifying your identity and taking a selfie.

Go to registration
❀51πŸ‘39πŸ”₯6🀯6⚑5πŸ€”2πŸ‘Œ1
Angle-based operations have long been integral to trading strategies, particularly due to the simplicity and clarity of constructing angles. Gann tools are a prime example of utilizing angles for market analysis. This approach, while traditional, can still yield refreshing insights when revisited with modernized methodologies.

In practical terms, constructing an angle-based indicator involves setting up axesβ€”typically price versus another currency priceβ€”to compare pairs and infer overbought or oversold states. Addressing discrepancies in axis values, such as different units like meters against kilograms, is crucial as it can skew the interpretation of angles. Standardizing these values to a common unit simplifies the calculation and enhances comparability.

Additionally, incorporating mathematical concepts such as wrapped normal distribution allows for handling infinite ranges in ang...

Read more...
πŸ‘13❀3πŸ‘3
In the realm of graphical user interfaces within the scope of library development, the subsequent improvements hinge on refining elements such as scrollbars for better functionality. The conversion from a horizontal to a vertical scrollbar presents a straightforward task that builds upon the same foundational principles, minus orientation adjustments. These developments are crucial, as these components will play a significant role in future Windows Form-style controls.

However, the process revealed an error manifesting as "blinking" due to premature graphical updates; resolved merely by elimination of prior object rendering before cropping. This fix marks a decisive moment enabling continued enhancements to graphical libraries.

Further library enrichments introduce functions that optimize performance by sidestepping slower standard methods when discerning event-related timeframes wi...

Read more...
πŸ‘13❀5πŸ‘3✍1
MQL5 Freelance is a pivotal platform for developers specializing in trading applications, offering a secure and effective environment since its launch in June 2010. It supports a wide array of programming languages including MQL5/MQL4, C++, and Python, catering to traders seeking custom solutions like trading robots and indicators.

With over 100,000 completed projects valued at $7 million, and a contributing community of 54,000 developers, MQL5 Freelance presents a fruitful opportunity for developers to earn significantly by fulfilling the needs of 25,000 satisfied clients. Traders from the millions using MetaTrader platforms can directly reach out for services, presenting a steady stream of potential projects.

The service is designed to streamline project management from order selection to payment, safeguarding developer interests by documenting every project phase within the syst...

Read more...
πŸ‘16❀6πŸ”₯4πŸ‘Œ1πŸ‘¨β€πŸ’»1
Foreballs:

Forex Trade Manager Grid MT4 is an EA designed for managing Forex trades using a grid management strategy on the MT4 platform. This tool automates the addition of positions to existing trades on the currently active pair. Users need to set up an initial order with Take Profit, after which the EA handles the subsequent additions and management up to 15 trades.

The system operates by adding positions at specified pip distances, managing the first three trades with individual take profits. From the fourth trade onwards, the EA aims to close the entire grid at a common break-even level. If the predefined profit (in pips) is achieved, the trade cycle can be renewed, or closed if losses exceed the set risk balance percentage.

The EA parameters include several customization options such as the distance between trades, individual and total take profits for multiple positions, m...

Read more...
πŸ‘14❀7πŸ‘€4πŸ‘2πŸŽ‰1
In the realm of automated trading, the evolution of dynamic templates offers a significant leap in functionality and user-friendliness. The concept of dynamic templates initially arose to handle different settings for each "instrument - period" pair, eliminating the need to launch multiple instances of an expert advisor (EA) individually across various charts. This not only simplifies system management but also mitigates potential user errors and conflicts commonly induced by manual setups.

A dynamic template operates by utilizing a directory structure of MetaTrader 4 and MetaTrader 5 to manage configuration settings through text files. This method allows for the dynamic adjustment of EAs without manual intervention, including automatic synchronization with web APIs via port 443. Such setups are crucial for maintaining consistency across terminals and potentially across different mac...

Read more...
❀11πŸ‘8✍2πŸ‘2πŸ‘Œ2πŸ”₯1😁1
MetaTrader 5 presents an array of notification options that are essential for trading, encompassing terminal, email, and push notifications. These features can be further enhanced by integrating them with popular social platforms such as Telegram and WhatsApp, a move that can significantly uplift the functionality of the MetaTrader system by facilitating efficient signal sharing.

The terminal notifications within MetaTrader 5 allow alerts to be set based on specific trading conditions directly through the tools tab. Users can configure these alerts to trigger actions such as playing sounds or sending notifications, ensuring that traders are immediately informed of significant trading events.

For connectivity beyond the trading desk, MetaTrader 5's push notifications can be set up to send alerts to a mobile device once MetaQuotes ID is linked, providing real-time updates necessary fo...

Read more...
πŸ‘9πŸ‘6❀5πŸ”₯3✍2
Time series forecasting is pivotal in understanding future data predictions based on historical sequences and often employs various machine learning models to enhance accuracy. Classical models like ARIMA and modern ML approaches like LightGBM show distinct methodologies in handling data trends and dependencies. Unlike traditional ML models that view data points as independent, time series models cater specifically to the sequence's temporal order, offering a more nuanced data analysis.

Feature engineering plays a crucial role in refining the model's responsiveness to time series predictions by incorporating elements like lagged features, rolling statistics, and date-time enhancements. This adjustment allows models to utilize past data trends effectively. For instance, extending classical ML models to accommodate time-dependent variables helps them perform comparably to bespoke time ...

Read more...
πŸ‘10πŸ‘5❀3😁1
In the latest article, we focus on the application of convolutional neural networks (CNNs) within the trading sector utilizing the MQL5 platform. CNNs are typically leveraged for image and video processing but are adapted here to analyze financial data through a custom MQL5 wizard signal class. This approach employs CNNs to categorize image pixels, further enhanced by utilizing layers that process through padding, convolution, activation, pooling, and backpropagation.

The initial step in a CNN is optionally padding the input data to maintain dimensionality post-convolution. During the convolution phase, kernel matrices multiply with the input data to produce feature maps, followed by the application of activation functions like ReLU to introduce non-linearity and manage vanishing gradients effectively. Subsequently, pooling techniques reduce dimensionality and computational load, cri...

Read more...
πŸ‘12❀8πŸ”₯3πŸ€”3🀝3πŸ†1