MQL5 Algo Trading
388K subscribers
2.56K photos
2.56K 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
In the latest installment of the MetaTrader 5 Machine Learning Blueprint series, focus is placed on improving labeling techniques for trading algorithms. Common fixed-time horizon labeling methods are critiqued for their inadequacies in reflecting real-world trading behaviors. Instead, dynamic approaches like the triple-barrier method and meta-labeling are explored, which mirror actual trading conditions by incorporating profit targets, stop-losses, and time limits. These methods align labeling with risk management and adaptation to market volatility, crucial for building robust and reliable machine-learning models in finance. Understanding these methods is essential for effective model implementation and successful trading strategies.

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #MachineLearning
❀45πŸ‘6πŸ‘Œ5⚑3🀣2πŸ†2πŸ‘¨β€πŸ’»1
SuperTrend identified as 0: Used for trend direction and reversals in trading strategies. Direnc marked as 1: Indicates areas where price action may face resistance. Support designated as 2: Highlights zones where price declines may halt. Trend listed as 3: Represents general direction of the market or asset price movement over time. Understanding these elements can enhance technical analysis and improve decision-making in trading environments. Properly utilizing such indicators can assist in developing robust trading strategies tailored to various market conditions. Ensuring consistency in analyzing these features may contribute to better forecasting and market insights.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #Strategy
❀25πŸ‘¨β€πŸ’»6πŸ‘3πŸ‘Œ3⚑2
Asynchronous execution of algorithms is crucial for enhancing performance in software systems. An interface similar to JavaScript Promises offers these capabilities, allowing asynchronous operations to be handled efficiently in various programming environments. The provided `timer.mqh` serves as an illustration of asynchronous execution, showcasing the potential of this approach. Developers can leverage this concept by utilizing npm package manager to manage dependencies and implement similar async functions in their projects.

Promise in JavaScript enables executing concurrent operations without blocking the main thread. Functions like `Promise.all`, `Promise.race`, and `Promise.any` provide robust mechanisms for handling multiple asynchronous tasks with ease, enhancing control and flexibility in software design. Deploying these techniques across var...

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #algorithm
❀23✍4πŸ‘Ύ4πŸ‘2🀑2πŸ‘¨β€πŸ’»2πŸ‘€1
Introducing Tarantella EA, an advanced adaptive grid trading system designed for strategy testing. This Expert Advisor integrates traditional grid methodologies with contemporary risk management strategies. Its foundation lies in executing buy/sell orders at Fibonacci-based intervals, adjusting position sizes dynamically in response to market conditions.

Key features include Market Profile Integration, confining trades to high-probability Value Areas while avoiding Point of Control zones. Multi-layer trend filtering utilizes ADX for trend strength alongside MA/MACD for directional approvals across timeframes. Adaptive Grid Management employs Fibonacci ratios for grid spacing adjustments.

Tarantella EA implements comprehensive risk management, with position limits and equity-based closure rules, incorporating advanced entry conditions requiring volume fil...

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL5 #MT5 #EA
❀24πŸ‘4πŸ‘¨β€πŸ’»3
Dive into the intricacies of logistic regression, a fundamental tool for binary classification, pivotal in algorithmic trading. Unlike its linear counterpart, logistic regression utilizes the sigmoid function to predict probabilities in binary outcomes, essential for decisions like Buy/Sell. Delve into practical steps such as data cleaning, handling NaN values, and feature encoding, crucial for effective model training. Explore the role of the confusion matrix in evaluating model accuracy, ensuring reliable predictions. This introduces a foundation for dynamic logistic regression models in trading, enhancing decision-making by accurately classifying outcomes, a key skill for MetaTrader 5 developers.

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL5 #MT5 #Algorithm
❀50⚑10πŸ‘7πŸ‘¨β€πŸ’»5😁4🀯1
An indicator is available that calculates target levels based on the average of price movements for specified timeframes such as annually, monthly, weekly, or every 4 hours. Calculation of the current levels involves defining several buffers: OpenBuffer[i] holds the opening price for the period. HighBuffer[i] is established at the period's opening price plus half the average daily range (adr/2). LowBuffer[i] is set at the period's opening price minus half the average daily range (adr/2). MaxHighBuffer[i] anchors at the opening price plus the full average daily range (adr). MinLowBuffer[i] fixes at the opening price minus the full average daily range (adr). This structure aids in identifying strategic price targets.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #Indicator
❀36πŸ‘¨β€πŸ’»3πŸ‘2πŸ”₯1
The Multi-Divergence EA capitalizes on market divergence to automate trading strategies by identifying potential reversal points using three key oscillators: RSI, MACD, and Stochastic Oscillator. The strategy focuses on high-probability signals through a robust confirmation process, minimizing market noise interference.

Key detection methods include:
- Bullish Divergence: Signaled by a price making a lower low against an indicator's higher low.
- Bearish Divergence: Occurs with a higher high price but a lower high indicator reading.

The EA's strength lies in its reliance on indicator confluence rather than a single indicator. It requires multiple indicators to confirm divergence before executing trades, enhancing signal reliability. To further refine accuracy, optional filters such as a Trend Filter and Volume Filter are available. The Trend Filter utiliz...

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #EA
❀35πŸ‘3πŸ‘¨β€πŸ’»3πŸ”₯1πŸŽ‰1
The MQL5 JSON Library is crafted to handle JSON data efficiently within the MQL5 ecosystem. It provides functionalities similar to modern languages, such as JavaScript and Python, through its intuitive Document Object Model (DOM) API. This library supports data parsing, manipulation, and serialization in various tasks, from simple configurations to complex data exchanges.

Key features include reliable JSON parsing from strings or files, and seamless creation of JSON objects and arrays with concise APIs. Its flexible parser supports JSON5 features like comments and trailing commas. Users can access and manipulate data effortlessly with syntax akin to Python dictionaries or JavaScript objects, allowing safe type conversions and dynamic modifications.

For advanced processing, the library includes a robust query engine utilizing JSON Pointer and JSONPath for prec...

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #JSON
❀23πŸ‘¨β€πŸ’»3πŸ‘2😐1
Explore the potential of the Commodity Channel Index (CCI) with this comprehensive guide on designing effective trading systems using MetaTrader 5. Learn the CCI fundamentals, from its calculation to practical applications, enhancing your approach to spotting trends and making informed decisions. Dive into strategies that leverage CCI for both trending and sideways markets, and discover how to automate these strategies through precise MQL5 programming. Transform trading plans into disciplined execution, minimizing emotional interference. This article offers technical clarity, empowering traders and developers with actionable insights to optimize their algorithmic trading endeavors efficiently.

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #CCI
❀63πŸ‘14πŸ‘Œ6πŸ‘¨β€πŸ’»3⚑2πŸ”₯2
A spread monitoring Expert Advisor (EA) provides critical insights for traders dealing with varied broker spread rules, including fixed, ECN, and standard accounts. This tool is instrumental for those wishing to gauge spread fluctuations and optimize EA performance accordingly. It continuously tracks and records the minimum and maximum spread values per day, resetting at midnight based on the broker's terminal time.

For flexibility, users can toggle between pips and points in the settings and choose to sort instruments by the highest spread. The EA is assigned to a chart that isn't involved in real trading, displaying data for all instruments visible in the Market Watch. By utilizing a unique labeling system, it minimizes traditional comment formatting issues, allowing clean presentation without the influence of chart backgrounds or grids.

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #EA
❀34πŸ‘3✍2πŸ‘Œ2πŸ‘¨β€πŸ’»1
Delving into the complex world of templates in MQL5, this article demystifies the challenge of type overloading, offering clarity to both novices and seasoned developers. It highlights the intricacies of template applications, emphasizing precise data type determination for seamless compiler execution. Common pitfalls such as incorrect variable declaration and type specification are addressed, illustrating how to enable seamless overloading in both procedures and functions. With practical examples and step-by-step solutions, it underscores the importance of understanding fundamental concepts, like the role of the typename, ensuring accurate code compilation and execution, ultimately aiding developers in crafting efficient algorithmic trading strategies.

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #Programming
❀20πŸ‘2πŸ‘Œ2πŸ‘¨β€πŸ’»2πŸ‘€2✍1
Machine learning models often make assumptions about data that may not hold true in real-world trading. Traditional statistical learning offers limited guidance on these relationships. Human traders, influenced by years of market experience, develop intuition-based strategies. These discretionary rules may provide a useful framework for machine learning applications.

A breakout trading strategy highlights the value of market logic. By observing price levels from previous days, this basic strategy reflects similar accuracy to complex deep neural networks. However, the strategy's volatility and aggressive nature necessitate adjustments for better control.

Testing and improving the strategy showed increased profits and reduced trading activity. Yet, it resulted in lower trading accuracy. Human intuition alone doesn't guarantee improvement, emphasizing the need...

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #ML
❀27πŸ‘8⚑2πŸ‘1🀯1πŸ‘¨β€πŸ’»1
Traders face difficulties trading multiple symbols during high-volatility events using MetaTrader 5's default setup, which supports only one Expert Advisor (EA) per chart. We've devised a solution that integrates a multi-symbol trading feature within the News Headline EA.

This enhancement enables managing multiple pairs from a single chart, using intuitive trading buttons built upon the MQL5 Standard Library and custom trading classes. This sophisticated EA can handle multiple symbols seamlessly, crucial for quick reactions to market changes during news releases.

The integration involves modifying the CTradingButtons class to support multi-symbol trading and adapting the News Headline EA to include this new functionality, offering traders significant efficiency and control.

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #Trading
❀31πŸ‘3πŸ‘¨β€πŸ’»3⚑2πŸ‘€1
The previous segment of this series discussed a backtested statistical arbitrage strategy involving cointegrated microprocessor sector stocks. It highlighted the volatility in cointegration due to external factors like company dynamics or economic shifts. The need for dynamic portfolio weight adjustments was also emphasized. The discussion moved towards the necessity of a persistent database setup to handle real-time updates efficiently, utilizing Metatrader 5 and Python integration.

For implementing a robust system, setting up a time-series specialized database, such as SQLite within Metatrader 5, is suggested. The database schema should include key structures like "symbol" and "market_data" tables. This system aims to enable seamless model and portfolio updates to adapt to market conditions continually. Adequate setup of this database infrastructure ...

πŸ‘‰ Read | Forum | @mql5dev

#MQL5 #MT5 #Algorithm
❀69πŸ‘12✍4πŸ‘Œ4πŸ‘¨β€πŸ’»2πŸ€“1
The Cincin EA (v2.24) for MetaTrader 5 is an automated trading tool designed for conservative trading strategies on a specific symbol like EURUSD. It features basket management, hedging, and position control, integrating random trade execution within user-defined risk constraints. The EA respects stop-loss and take-profit settings determined through ATR or fixed pip values while adhering to a daily trade cap. It focuses on overall profit/loss management, utilizing breakeven and hedging techniques to manage risk exposure.

Key safeguards include margin checks, market status validations, and enforced time/pip intervals between trades. It's crucial to note that this EA is unsuitable for live trading and is best used for demo and strategy testing purposes. The use of martingale or similar strategies risks a total balance loss. It remains a work in progress requir...

πŸ‘‰ Read | AppStore | @mql5dev

#MQL5 #MT5 #EA
❀41πŸ‘¨β€πŸ’»6πŸ€”2πŸ’―2⚑1πŸ‘1
Part 20 of the MQL5 series focuses on harmonic patterns, crucial tools in technical analysis. These patterns use precise Fibonacci ratios to predict reversal zones. Key patterns include Gartley, Bat, Butterfly, and Crab, each with distinct Fibonacci measurements integral for pattern validation.

Understanding Fibonacci retracement and extension is vital for harmonic patterns. Retracement measures market pullbacks, while extensions project potential price movements. In MQL5, these ratios aid in programming pattern detection effectively. The importance of precise ratio application in pattern recognition is emphasized, as deviations can invalidate setups.

Upcoming discussions will explore automating pattern identification using MQL5, enhancing trading strategies through harmonic patterns.

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #Harmonic
❀30πŸ‘¨β€πŸ’»2πŸ‘1
Control theory's feedback mechanism offers a promising upgrade for algorithmic trading, particularly in dynamic markets. By integrating a feedback controller with a trading strategyβ€”initially utilizing two moving averages to define trading signalsβ€”we can enhance system adaptability. The controller monitors and adjusts the strategy based on market conditions and past performance, thereby learning to improve profitability and reduce risk. This novel approach shows significant profit and Sharpe ratio increases, with fewer trades and heightened efficiency. Developers leveraging this framework can optimize trading strategies, aligning them closer with market realities and minimizing repetitive mistakes, all through intelligent system adjustments.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #AlgoTrading
❀34πŸ‘3πŸ‘¨β€πŸ’»2
Explore the innovative approach of transforming market behavior into binary code to uncover hidden patterns. By encoding price movements, one can translate complex data into sequences of zeros and ones, opening up new insights for traders and developers. This imaginative technique highlights the importance of timeframes by revealing how the same binary sequence can differ across them. Discover the potential of these patterns, particularly with volatile assets like Bitcoin, where sequences can capture clear trends. Analyze the market from a new perspective, like a decryptor, seeking patterns in binary, and consider the potential of integrating machine learning for predictive insights.

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL5 #MT5 #Algorithm
❀29πŸ‘¨β€πŸ’»6πŸ‘2
The Artificial Tribe Algorithm (ATA) leverages tribal behavior to enhance optimization processes by combining dispersal and migration. As an innovative bionic intelligent algorithm, ATA replicates tribal reproductive and migratory mechanisms to find optimal solutions. Implementation begins by setting parameters and initializing populations, assessing conditions for reproduction or migration based on a fitness criterion. An adaptive dual behavior system facilitates deep exploration or migration depending on progress towards a global optimum. A global inertia weight improves search performance. Recent tests highlight ATA's effectiveness, yet point to challenges in maintaining solution diversity. Modifications incorporating dynamic probabilities show promise, addressing diversity issues and improving overall efficiency.

πŸ‘‰ Read | AppStore | @mql5dev

#MQL5 #MT5 #Algorithm
❀40πŸ‘2πŸ‘¨β€πŸ’»2
Explore the cutting-edge MASA framework designed for dynamic portfolio risk management, seamlessly integrating deep reinforcement learning with a multi-agent system. MASA features two key agents: one maximizes returns leveraging the TD3 algorithm, while the other agent utilizes evolutionary algorithms for risk minimization. A Market Observer uses deep neural networks to analyze market trends and adapt strategies in real time. Experimentation on major indices like CSI 300 and S&P 500, over a decade, showcases MASA's superiority over traditional models. The MASA's implementation in MQL5 highlights its modular design, ensuring accessibility and efficiency for developers aiming to enhance algorithmic trading strategies.

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #Fintech
❀26⚑3πŸ‘3πŸ‘¨β€πŸ’»2πŸ‘Œ1