MQL5 Algo Trading
387K 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
Discover the power of Ant Colony Optimization (ACO) for solving complex combinatorial problems in algorithmic trading. Belgian researcher Marco Dorigo's ACO models the foraging behavior of ants, leveraging pheromone-based stigmergy to find optimal paths. This population-based method excels in path planning by simulating how ants leave pheromone trails that guide others, creating a feedback loop to refine solutions.

Key variants of ACO, such as Ant System (AS), Ant Colony System (ACS), and Max-Min Ant System (MMAS), enhance its capabilities through optimized pheromone updates and path selection strategies. Tailoring these algorithms for trading can revolutionize neural network training and financial instrument optimization.
#MQL5 #MT5 #algorithm #AI

Read more...
πŸ‘56❀23πŸ‘8πŸ‘¨β€πŸ’»1
Smart MA Trailing Stop EA is an effective tool for trending markets, automating stop loss adjustments. It adjusts stop losses based on the selected Moving Average (MA) period and the distance between the price and the MA.

Automated Stop Loss Adjustments: The EA automatically adjusts stop losses in line with the trend, securing profits as long as the trend persists.

Customizable MA Period and SL Distance: Users can set their preferred MA period and stop loss distance in pips.

Designed for Trending Markets: The EA places stop losses at a safe distance, protecting positions in momentum-driven markets.

Compatibility with 4 and 5-Digit Brokers: The EA adapts to the correct decimal placement, ensuring accuracy without extra effort.

This tool provides precise stop loss management, securing profits during strong market movements, and is user-friendly.
#MQL4 #MT4 #EA #AlgoTrading

Read more...
❀22πŸ‘19πŸ‘¨β€πŸ’»2πŸŽ‰1πŸ†1
For those looking to automate opening buy and sell positions in MetaTrader 5 at the current market price with specific stop loss and take profit parameters, below is a simplified script. This script ensures the automatic capture of the current price and sets the trade parameters without displaying any dialog windows upon execution. Initial values for lot size, stop loss, and take profit should be defined in the script, which can later be modified via global variables in the MT5 menu.

```mql5
//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
void OnStart()
{
// Define initial parameters
double lotSize = 0.1;
int stopLossPips = 20;
int takeProfitPips = 40;

// If global variables exist...
#MQL5 #MT5 #script #algorithm

Read more...
πŸ‘27❀11πŸ‘¨β€πŸ’»4πŸ”₯3
In algorithmic trading, choosing the right indicators is crucial. Traditional feature selection methods often fall short in non-stationary environments due to their global bias. The "Local Feature Selection" (LFS) algorithm offers a solution by focusing on locally optimal feature subsets, making it ideal for data with shifting patterns. This method emphasizes minimizing intra-class distances while maximizing inter-class distances through a weighting scheme that adapts dynamically to data variations. Implementing LFS in Python allows traders and developers to build more adaptive and robust models, ultimately enhancing predictive performance on MetaTrader 5. Discover how LFS can streamline your trading strategy!
#MQL5 #MT5 #Indicator #ML

Read more...
πŸ‘12❀8πŸ‘Œ3πŸ‘¨β€πŸ’»2
Struggling with non-stationary financial time series? Dive into our deep-dive analysis on achieving stationarity using first differences and empirical distribution functions. Learn how stationarity ensures accurate calculations in algorithms and why it matters for both regression and neural network analyses. Discover the Kolmogorov-Smirnov test’s role in detecting data homogeneity, pivotal for precise trading strategies and forecasts. Explore practical applications with real data cases, including EURUSD and XAUUSD minute bars, and understand how this statistical approach ensures reliable, error-free predictions even with dependent data. Perfect for enhancing your algorithmic trading models.
#MQL5 #MT5 #Indicator #Algorithm

Read more...
πŸ‘16❀11πŸ‘2πŸ‘¨β€πŸ’»2
Bollinger Bands, created by John Bollinger in 1987, quantify market volatility and identify overbought/oversold conditions. Consisting of three lines, they expand and contract with volatility changes, serving as dynamic support/resistance levels. This article dives into 8 Bollinger Bands signals, explaining their integration into a custom signal class for algorithmic trading in MetaTrader 5. The goal is to optimize and test different pattern weights, leveraging classes from MQL5's standard library for efficient implementation. Using these signals, traders can develop robust strategies, anticipating trend reversals and breakouts for enhanced trading decisions in volatile markets.
#MQL5 #MT5 #Indicator #Strategy

Read more...
πŸ‘28❀10πŸ”₯4πŸ‘¨β€πŸ’»3
MetaQuotes Language 5 (MQL5) Expert Advisor enhances interactivity with Telegram via responsive inline buttons. Inline buttons, defined using JSON, offer streamlined user actions within messages. The article covers their integration in MQL5, including creating a dedicated message class to manage interactions and a callback query class for handling specific user actions triggered by these buttons. By incorporating these elements, the bot processes user inputs dynamically, improving the overall user experience. Guidance on testing the bot ensures seamless functionality, making trading bots more responsive and user-centric for optimal trading efficiency.
#MQL5 #MT5 #Telegram #EA

Read more...
❀26πŸ‘21πŸ‘¨β€πŸ’»4πŸ”₯3πŸ‘Ύ3πŸ‘Œ2
A new script provides a graphical panel of information to display the maximum lot size permitted, calculated based on account size, leverage, and free margin. Unlike traditional scripts that rarely use dialogs, this script offers a visual representation without needing to load an expert advisor. This functionality is particularly useful for those who prefer quick access to essential trading information directly through a script, streamlining the process of fetching free margin-related data. Efficient and straightforward, this script meets a specific need by delivering critical trading metrics with minimal setup.
#MQL5 #MT5 #script #Forex

Read more...
πŸ‘19❀8πŸ‘¨β€πŸ’»6
Auto-optimizing forex trading algorithms offer significant advantages for automated traders. An Expert Advisor (EA) can adjust its strategy based on market conditions post-trade. This adaptive feature allows EAs to refine their approach over time.

Key components to set up include necessary libraries, input parameters, global variables, and optimization settings. The core functions of the EAβ€”initialization, deinitialization, and tick processingβ€”are essential for maintaining operational stability.

Optimization logic involves evaluating parameter combinations to find the best-performing settings. Techniques like multi-criteria optimization and walk-forward optimization reduce the risk of overfitting and improve robustness.

Best practices include balancing optimization frequency and maintaining computational efficiency. Comprehensive logging and effective use of d...
#MQL5 #MT5 #EA #Algo

Read more...
πŸ‘21❀14πŸ‘¨β€πŸ’»3πŸ‘Œ1
Developing an automated trading application (EA) involves multiple stages where each generates critical information. The information is saved in a database with results stored from various strategy tests.

A challenge arises in creating trading strategy objects from this saved data. Direct object storage in the database is not an option. Converting object properties to a string for storage ensures data can be read back and objects recreated. This can be managed through methods or constructors that parse these strings to assign values to object properties.

Creating complex objects, such as groups of trading strategies or an EA itself, demonstrates the need for a systematic approach to string parsing and object reconstruction.

A practical implementation requires classes to be "factoryable." This means developing a base class, CFactorable, which can be initi...
#MQL5 #MT5 #EA #Strategy

Read more...
πŸ‘20❀13πŸ‘¨β€πŸ’»2⚑1πŸ‘1
## Introduction

Enhancing the Admin Panel GUI in MQL5 includes essential improvements such as toggling between dark and light themes, adding stylish buttons, and customizing fonts.

## Basic Admin Panel Achievements

Previously accomplished:
- Created an Admin Panel with a Messaging Interface and Telegram Integration.
- Added buttons for minimize, maximize, close, and quick messaging.

## Applying MQL5 GUI Styling Features

MQL5 offers various tools for GUI customization, including color and font adjustments. These enable creating a visually cohesive and functional interface.

## Customizing Colors and Fonts

Define an array of available fonts and manage their selection through an index. Implement a button for users to cycle through fonts, ensuring dynamic and cohesive panel appearance.

## Theme Management Logic

Set up a system with light and dark themes. ...
#MQL5 #MT5 #GUI #Styling

Read more...
πŸ‘40❀17πŸ‘4πŸ‘¨β€πŸ’»2πŸ‘€2πŸ‘Œ1πŸ€“1
Announcing the updated NoLoss EA, improved significantly through community feedback. Unlike most lagging indicators, this EA eliminates dependency on indicators, candlestick patterns, chart patterns, or price action analysis. It uses a progressive strategy verified over a year of use and four years of backtesting.

**Preferred Pair**: EURUSD

**Setup**: Compatible with any timeframe due to its non-reliance on traditional indicators and patterns.

**Parameters**:
- **Initialsize**: Set your initial lot size based on your account balance.
- **MaxBuy/Sell**: Define the maximum number of open buy/sell positions.
- **OverallBuy/SellProfit**: Establish the combined profit target for all buy/sell orders.
- **Slippage**: Enter your slippage value.
- **DistanceBetweenOrders**: Set the pip distance to trigger new orders in the same direction.
- **NumberofBuy/Sell**: Sp...
#MQL4 #MT4 #EA #Strategy

Read more...
πŸ‘40❀21πŸ‘€7⚑3πŸ‘¨β€πŸ’»3✍2
Category Theory, a powerful mathematical framework, can be leveraged in algorithmic trading using MQL5 to understand the relationships between trading strategies, instruments, and market conditions. By classifying and analyzing these relationships through concepts like domains and morphisms, traders can identify patterns and create adaptable, reliable trading algorithms. This approach ensures consistency, verifies system correctness, and enhances communication of complex trading strategies. Practical applications include constructing unique trading domains, enforcing data integrity, and visualizing morphisms, leading to sophisticated expert advisors in MetaTrader 5. This methodology aids MQL5 programmers in developing robust, scalable trading systems.
#MQL5 #MT5 #AlgoTrading #Strategy

Read more...
πŸ‘40❀26🀯7✍4⚑3πŸ‘¨β€πŸ’»3
The Trend Direction Force Index v2 (TDFI) indicator has been successfully converted from TradingView to MQL4. Originally designed for identifying market trend direction and magnitude, this indicator is now available for MetaTrader 4 users. The TDFI calculates a standardized measure of price movement, offering enhanced insight into market dynamics. This version maintains the original algorithm, ensuring consistency in its output while leveraging the MQL4 environment. The conversion facilitates seamless integration into existing trading strategies for algorithmic traders and technical analysts working within the MetaTrader 4 platform.
#MQL4 #MT4 #Indicator #TDFI

Read more...
πŸ‘34❀24πŸ‘3πŸ‘¨β€πŸ’»3
In this latest installment, we transform the Chart Trade panel into an indicator and modularize the sound system previously embedded in the EA. This approach enhances reusability and simplicity across different MetaTrader 5 components. By introducing a sound service and an accompanying library, we streamline the sound alert mechanism, making it accessible from any script, EA, or indicator. This modular and scalable setup facilitates better code maintenance and adaptability, avoiding legacy compatibility issues. Whether you're a seasoned developer or new to algorithmic trading, these modifications offer practical advantages for more robust and manageable trading systems.
#MQL5 #MT5 #Indicator #AlgoTrading

Read more...
πŸ‘25❀22πŸ‘¨β€πŸ’»4✍2πŸ†1
MetaTrader 5 Platform beta build 4540 introduces numerous new features and improvements to the web platform:

β€’ A crosshair mode for accessing precise values and measuring distances on the chart, as well as a new line chart type.
β€’ Ability to enable additional information in the Market Watch in the the mobile version.
β€’ Expanded list of supported hotkeys for more efficient chart operations.

New machine learning functions are now available in MQL5. These include integration with the OpenBLAS matrix computation library and improved ONNX Runtime support to enable the execution of more complex neural models.

Additionally, the platform now offers improved tick history downloading and exporting features. Also, we have fixed bugs in testing agents that could lead to excessive RAM consumption.

Update to the beta version now and be among the first to experience the new features
πŸ‘42❀35πŸ”₯9🀨5πŸ‘¨β€πŸ’»4πŸ‘2πŸ‘Œ1
Fair Value Gap (FVG) represents a price imbalance appearing when there's a significant discrepancy between the opening, high, low, and closing prices over three consecutive candles. This occurs when one candle's range does not fully overlap with the surrounding candles, creating a "gap" in the price action. Traders identify these gaps as potential zones where the price may retrace to correct the imbalance before continuing its original direction. This concept plays a crucial role in many trading strategies for pinpointing potential entry and exit points based on observed market inefficiencies.
#MQL5 #MT5 #Algorithm #Strategy

Read more...
πŸ‘47❀23πŸ‘¨β€πŸ’»3🀯2
An indicator identifying Engulfing candle patterns is available. It features red arrows for Bearish Engulfing and green arrows for Bullish Engulfing patterns. This tool aids in recognizing significant market trends and reversals.

For those interested in developing custom Indicators, Scripts, or Expert Advisors, advanced development services are offered. Enhance your trading strategies with precision-tailored tools designed to meet specific requirements. Contact for collaborative opportunities and custom development projects.
#MQL5 #MT5 #Indicator #EA

Read more...
❀26πŸ‘18πŸ‘¨β€πŸ’»6✍4🀯1
An opportunity to enhance trading strategies is now available with a customizable trading bot integrated with a specific indicator. This demo version showcases potential capabilities. For personalized assistance in developing an optimized trading bot tailored to individual needs, professional support is offered to ensure effective results. Reach out for further collaboration and achieve a sophisticated trading solution.
#MQL5 #MT5 #EA #Indicator

Read more...
❀27⚑8πŸ‘5πŸ‘¨β€πŸ’»4πŸ‘€1
Dive into the integration of Deep Learning with three advanced Expert Advisors (EAs) in MetaTrader 5, enhancing algorithms for more precise market predictions and risk management. This article explores how Nash's Game Theory, Causality Network Analysis, and Stochastic Optimization benefit from incorporating Python-generated ONNX models. Detailed modifications in MQL5 scripts show improved decision-making and trading outcomes. Results highlight varied performance: DL models in some cases improved consistency and win rates, while others maintained profitability with increased caution. This deep dive underscores the potential and careful implementation required for DL in trading, promising better-adapted strategies but necessitating rigorous testing across market conditions.
#MQL5 #MT5 #EA #DeepLearning

Read more...
πŸ‘20❀19⚑3✍1πŸ‘¨β€πŸ’»1