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
Time series forecasting in multivariate settings faces challenges due to the curse of dimensionality. Traditional models struggle with performance when data windows are insufficient, demanding innovative approaches for analysis. The Spatio-Temporal Information (STI) Transformation equation addresses these issues by translating multivariate spatial data into the temporal dynamics of the target variable, expanding sample size and countering short-term data limitations.

Utilizing Transformer-based models enhances this process through the Self-Attention mechanism. Transformers capture global relationships without considering variable distance, alleviating dimensionality issues. The Spatiotemporal Transformer Neural Network (STNN) demonstrated in research efficiently forecasts multivariate time series by integrating STI with Transformer architecture.
#MQL5 #MT5 #TimeSeries #AlgoTrading

Read more...
πŸ‘32❀10πŸ‘€4πŸ‘Œ2πŸ‘¨β€πŸ’»2
Explore the innovative Liquidity Grab trading strategy, central to Smart Money Concepts in algorithmic trading. This strategy leverages institutional market behavior, focusing on exploiting high liquidity zones like support and resistance levels. The article delves into developing an Expert Advisor (EA) using MQL5, detailing its step-by-step coding process and highlighting essential functions like order execution, rejection patterns, and moving average integration. Backtesting on GBPUSD revealed promising results, particularly during high-volatility periods. Practical insights are provided for optimizing intraday trades and restraining trading to volatile sessions. Empower your algorithmic trading with these strategic insights and comprehensive EA development guidelines.
#MQL5 #MT5 #Strategy #EA

Read more...
πŸ‘34❀13πŸ‘Œ3πŸ‘¨β€πŸ’»2
The document outlines the ASBO (Adaptive Social Behavior Optimization) algorithm, focusing on its two-phase evolution for optimization tasks. In the first phase, multiple populations evolve independently, enhancing solution diversity and localizing the global optimum. The resulting best solutions undergo a second phase for accelerated convergence to the optimal solution, leveraging adaptive parameters. The document details pseudocode, highlighting critical steps like initialization, independent handling of populations, and combined population handling through the C_AO_ASBO class. The algorithm's effectiveness leverages traditional approaches from existing optimization models while introducing novel elements tailored for ASBO's multi-population method.
#MQL5 #MT5 #AI #Algorithm

Read more...
❀28πŸ‘9πŸ†3⚑2πŸ‘¨β€πŸ’»2✍1πŸ‘Œ1
Advancements in MQL5 allow developers to implement cryptographic algorithms directly, improving security and system stability. Custom implementations provide greater control, tailoring to specific tasks, and reducing vulnerabilities. Cryptography is crucial for APIs and trading system security, requiring a thorough understanding of algorithms.

A significant issue arises with API signature generation, where MQL5's native hashing functions may not align with cryptocurrency exchange requirements, causing authentication failures. This often necessitates custom SHA-256 implementations to ensure compatibility with exchanges like Binance or Bybit.

Custom implementations not only resolve compatibility issues but also offer performance optimization, crucial for high-frequency trading. Optimizing SHA-256 for trading can involve recognizing and reusing consis...
#MQL5 #MT5 #Cryptography #SHA256

Read more...
πŸ‘34❀26πŸ‘Œ3πŸ‘¨β€πŸ’»3
The indicator setup uses the standard 'DeMarker' indicator in a subwindow, which is smoothed through a 'Moving Average'. 'Arrow' objects indicate intersections. This method visualizes potential signals for traders. Two approaches exist: Aggressive traders may act on signals from bar #0, accepting higher risk. Alternatively, more risk-averse traders might prefer signals from bar #1, which offers greater stability through conservatism. This dual-method strategy provides flexibility in trade execution depending on individual risk tolerance levels. The approach maintains a balance between early entry opportunities and reduced risk exposure.
#MQL5 #MT5 #Indicator #Strategy

Read more...
πŸ‘30❀15πŸ‘¨β€πŸ’»4⚑2✍2πŸ‘Œ2
In the current technical chapter, multiple indicators such as RSI, Stochastic Oscillator, and Moving Average will enhance a trading strategy. Discussion focuses on recognizing hidden bullish and bearish divergences using RSI lows and highs in relation to price movements. Utilization of three indicators aims to develop expert advisors for automating trades and implementing risk management through calculated lot sizes and stop-loss strategies.

The Moving Average evaluates trend direction, while the Stochastic Oscillator confirms trading signals. Specific trading logic for identifying and setting divergence techniques will be addressed, including predefined Risk-Reward Ratios and adjusting based on EMA positioning.

Indicator properties and data retrieval are essential as arrays store key indicator metrics. This arrangement facilitates informed EA tradin...
#MQL5 #MT5 #Trading #Indicators

Read more...
πŸ‘20❀9✍3πŸ‘¨β€πŸ’»3πŸ‘Œ2πŸ”₯1
Explore the development of a calendar-based breakout strategy in MetaTrader 5 using MQL5. The focus is on harnessing volatility from high-impact news events to seize breakout opportunities. Discover how to create a class to process calendar data, execute robust backtests, and implement live trading execution. Key components include crafting a CCalendarEntry class to manage economic events, utilizing backtesting techniques for efficiency, and placing strategic buy/sell stop orders around news triggers. The approach leverages scheduled events for predictive trading, ensuring disciplined risk management. This guide offers a blueprint for systematic trading using news-driven volatility, particularly appealing to traders and developers in algorithmic trading.
#MQL5 #MT5 #Algorithm #Strategy

Read more...
πŸ‘53❀29πŸ‘Œ5πŸ€”4πŸ€“3πŸ‘¨β€πŸ’»3
The generalized smooth step indicator enhances signal processing by allowing progressive smoothing. This updated version leverages a property where the smooth step can undergo additional smoothing, inspired by Kenneth H. Perlin's work. The implementation utilizes various orders for different effects: order 0 equates to a built-in stochastic divided by 100 with a stochastic smoothing factor of 1; order 1 replicates the traditional smooth step indicator; higher orders further filter the signal while maintaining expected value ranges.

When sharing this code, it's critical to provide a descriptive name and an overview of its functionality. Supplement the code with a concise explanation to assist users in understanding its application. Visual aids can be instrumental in demonstrating the code's impact and utility.
#MQL4 #MT4 #Indicator #AlgoTrading

Read more...
πŸ‘34❀12πŸ‘Œ3πŸ‘¨β€πŸ’»3πŸ”₯2
Discover the Awesome Oscillator (AO), a powerful momentum indicator designed by Bill Williams. This article delves into AO's mechanics, comparing the momentum across short and long time frames. Learn three educational trading strategies integrating AO with moving averages for better signal accuracy. Create precise trading systems using these strategies with MQL5, enhancing your MetaTrader 5 experience. Gain insights into generating bullish or bearish signals, evaluating momentum strength, and utilizing AO with exponential moving averages for optimized trading decisions. Enhance your algorithmic trading skills by practicing these strategies and developing robust trading systems.
#MQL5 #MT5 #Trading #Indicator

Read more...
πŸ‘53❀34πŸ‘¨β€πŸ’»6πŸ‘Œ4😈4⚑2😐2
Normalized values are crucial in various technical fields such as computer graphics, machine learning, and technical analysis. The Smooth Step function is a viable approach for value normalization, fitting within the sigmoidal function family. Unlike typical interpolation uses, this method operates as a clamping function. It generates results in the 0 to 1 range, filtering certain outputs produced by stochastic models while maintaining a similar operational scope.

The Smooth Step indicator can process all standard price data inputs rather than being limited to common configurations like close/close or low/high/close. It is recommended to employ this indicator in ways similar to the built-in stochastic indicator for efficient analysis. This approach ensures reliable and streamlined value normalization across multiple domains.
#MQL4 #MT4 #Indicator #ML

Read more...
πŸ‘30❀15✍6πŸ”₯3πŸ‘¨β€πŸ’»3πŸ‘Œ2πŸ‘€2
Dive into algorithmic trading with the Metrics Board EA for MetaTrader 5, a cutting-edge tool that transforms complex market analysis into simple, actionable insights. This distinct EA offers a seamless application integrating essential analyses such as High/Low, Volume, and Trend evaluation with a user-friendly interface. Developed using MQL5, it effectively utilizes button clicks for real-time data processing and presentation. The EA’s advanced algorithm ensures high-speed, accurate computations, providing immediate value to traders. It supports everything from optimally identifying key levels to enhancing strategies with important market metrics, marking a step forward in trading tool efficiency and accessibility.
#MQL5 #MT5 #EA #AlgoTrading

Read more...
πŸ‘21❀15πŸ‘¨β€πŸ’»4πŸ‘Œ3
Dive into streamlined MQL5 development with our comprehensive EX5 trading libraries. By simplifying trade operations and historical data management, these libraries drastically reduce development time. Our final module tackles a key MQL5 limitation, providing seamless access to canceled pending order data. The innovative GetLastCanceledPendingOrderData() function efficiently retrieves critical information such as symbol, price, and duration. This tool is essential for developers building applications reliant on accurate trading history, allowing a focus on broader analytical insights. Through well-structured and intuitive functions, our libraries enhance precision and efficiency in trading history processing, benefiting both novice and experienced MetaTrader 5 developers.
#MQL5 #MT5 #Algorithm #Library

Read more...
πŸ‘21❀9πŸ‘¨β€πŸ’»6πŸ‘Œ4
A continuation for beginners on creating complex data types: structures, unions, and classes. Understanding these concepts helps in organizing data effectively and ensuring modular, maintainable code.

Structures group different types of data under one name, facilitating easier access and modification. They can even contain other structures for more intricate data management. Common predefined structures in MQL5 include MqlDateTime and MqlTradeRequest.

Unions allow storing variables of different types in the same memory location. Ideal for converting types, but restricted from containing strings or dynamic arrays.

Object-oriented programming, through classes, encapsulates data and functionalities, promoting reusability and reduced error occurrences. Classes restrict direct data access by making internal variables private, accessible only via pub...
#MQL5 #MT5 #programming #DataStruct

Read more...
❀21πŸ‘13🀣4πŸ‘¨β€πŸ’»3πŸ‘Œ2
For efficient management of trading data, several components are integral in developing an application using the MQL5 language. The application is structured with a Service app for generating reports and sending notifications; a collection of accounts to access historical positions; and separate classes for deals and positions.

The Deal class facilitates storing and accessing individual trade properties, enabling comparison functionalities that aid in creating filtered lists based on selected criteria. The Historical Position class, on the other hand, manages composite data from trades, offering a streamlined method to reconstruct closed market positions for analysis.

These elements combined enable seamless tracking and reporting, crucial for evaluating past trades, optimizing strategies, and maintaining trading efficiency while abiding by notification co...
#MQL5 #MT5 #Trading #Forex

Read more...
πŸ‘40❀21πŸ‘¨β€πŸ’»6✍4😁3πŸ‘Œ2
A generalized version of the smooth step indicator is now available, building upon Kenneth H. Perlin's concepts. When applying order 0, it behaves similarly to the built-in stochastic divided by 100, with the stochastic slowing set to 1. Order 1 replicates the standard smooth step indicator. Higher orders provide enhanced signal filtering while retaining values within expected ranges. This indicator can be used in scenarios requiring normalization, offering an alternative to stochastic for normalized input in your code. It effectively maintains data integrity across different applications, ensuring consistent and reliable results within technical analysis and systems requiring normalized data inputs.
#MQL5 #MT5 #Indicator #AlgoTrading

Read more...
❀17πŸ‘12πŸ‘¨β€πŸ’»3πŸ‘Œ2
Understanding the fundamentals of programming requires a focus on variables, as they serve as the foundation of any computer program. Variables can change their values or remain constant; when they do not change, they are referred to as constants. In programming, precision in variable declaration and initialization is crucial to prevent unpredictable outcomes. Using MQL5, programmers can better grasp how variables work, understanding compiler warnings, variable scope, and the implications of uninitialized variables. Properly declared variables can improve code reliability by minimizing errors and establishing clarity in the code's purpose and functionality. As we progress, we'll discuss deeper concepts, such as visibility and lifetime, to build a comprehensive understanding of variable management and optimization in programming.
#MQL5 #MT5 #MQL5 #Programming

Read more...
πŸ‘17❀7πŸ‘¨β€πŸ’»3πŸ‘Œ2
Financial markets require sophisticated analysis for accurate decision-making. Integrating libraries such as MQL5 and Python provides enhanced analytical capabilities. MQL5 serves as the core, with Expert Advisors (EAs) acting as a bridge to external resources like Python’s Pandas library. This setup allows in-depth data processing and signal generation, enhancing trading strategies without replacing MQL5's fundamental role.

The interaction process begins with the MQL5 EA collecting market data, which is formatted and sent to a Python server for analysis. Pandas processes this data, returning insights such as trading signals to the EA, which updates the market charts accordingly.

This framework relies on Python's simplicity and Pandas’ analytical power, supporting the generation of trading signals based on historical data. The integration provides flexibility...
#MQL5 #MT5 #Pandas #EA

Read more...
πŸ‘21❀11πŸ‘¨β€πŸ’»5πŸ‘Œ4
MQL5 has evolved beyond a basic programming language for simple trading robots. It now supports the creation of complex trading programs that can be robustly deployed and tested. Manual traders often utilize the native or custom indicators for market analysis in MetaTrader5, which offers a user-friendly interface for indicator attachment to charts. However, in algorithmic trading, indicator calculations hold more significance than visual chart representations.

Algorithmic trading requires meticulous calculation of indicators like the Simple Moving Average (SMA). Traditional approaches using predefined price constants and smoothing methods in MQL5 may limit flexibility. Rethinking the input structure for indicators can expand exploration possibilities. Inspired by TA-Lib's flexible approach, implementing indicators with customizable input fosters ne...
#MQL5 #MT5 #Algorithm #Indicators

Read more...
πŸ‘19❀5✍4πŸ‘¨β€πŸ’»4πŸ‘Œ3
This article explores the balance between human intuition and algorithmic precision in trading software, presenting a refined implementation of the Bollinger Bands strategy using MetaTrader 5. By introducing a logistic regression model to assess trade confidence, the improved strategy increased profitability while preserving simplicity. The refined algorithm placed 495 trades with a 63% success rate, resulting in a $2,427 profit with a 0.74 Sharpe ratio, compared to losses with the original model. This approach balances classical trading strategies and modern computational tools, demonstrating effective yet straightforward techniques to enhance algorithmic trading without unnecessary complexity.
#MQL5 #MT5 #Trading #Algorithm

Read more...
πŸ‘19❀14✍11πŸ‘¨β€πŸ’»9⚑6πŸ’”3πŸ‘Œ2
The "Symbol Swap Panel" is an efficient utility for traders aiming to optimize their chart symbols and Market Watch management. It provides a feature to switch chart symbols with a single click, facilitating quick adjustments to trading strategies without navigating multiple settings. New symbols are automatically added to Market Watch, providing instant access to real-time data.

Designed to enhance trading workflow, this tool reduces the time needed for symbol monitoring and analysis. It's equipped to handle historical data, aiding in past market condition analysis for informed decisions. The tool ensures accurate data loading, though switching back and forth when changing timeframes is recommended for optimal performance.

For traders managing multiple symbols, the Symbol Swap Panel streamlines processes, maintaining focus and efficiency. Active trader...
#MQL4 #MT4 #Trading #Utility

Read more...
πŸ‘18πŸ‘¨β€πŸ’»9❀7πŸŽ‰3πŸ‘Œ3