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
Unveil the intricacies of the Asian Breakout Strategy expertly coded into an MQL5 Expert Advisor. This robust system utilizes session-based range detection and moving average trend filtering. It strategically places pending orders at calculated breakout levels, ensuring optimal position entries. Built-in dynamic risk management, including stop-loss and take-profit settings, mitigates market unpredictability. Additionally, a time-based exit strategy ensures efficient order handling post-session. Successful backtesting showcases its effectiveness, which can be further enhanced with trailing stops. This comprehensive EA offers traders and developers a precise tool for trading breakouts, enriching both technical skills and algorithmic trading strategies.

πŸ‘‰ Read | Calendar | Share!

#MQL5 #MT5 #AlgoTrading
❀14πŸ‘13πŸ‘Œ1πŸ†1πŸ‘¨β€πŸ’»1πŸ‘Ύ1
Our focus shifts to automating trade entries using MQL5 in the Economic Calendar series. Trades are automated by analyzing news events, user-defined filters, and time offsets. Orders are executed based on forecast and prior values, aligned with market expectations.

Critical trade logic components include time filters, currency significance, and impact assessments. Trades are evaluated using an offset period before the event. If forecast exceeds prior values, a BUY is executed; otherwise, a SELL. Absent or equal data results in no trade.

Countdown timers manage timing until news release, resetting post-trade to adjust to evolving conditions. Robust implementation ensures trades are executed accurately and strategically, enhancing automated trading precision.

πŸ‘‰ Read | Docs | Share!

#MQL5 #MT5 #AlgoTrading
πŸ‘23❀13✍3πŸ‘Œ2πŸ†1πŸ‘¨β€πŸ’»1
The Quarters Theory, developed by Ilian Yotov, segments significant price ranges into smaller segments for technical analysis. These segmentsβ€”defined by major whole numbers and subdivided into large and small quartersβ€”offer traders a structured way to identify support and resistance levels. Using MQL5, the "Quarters Drawer" script automates the visualization of these levels, simplifying identification of key market dynamics.

MQL5 implementation enables customization through input parameters, allowing traders to modify line styles, colors, and visibility of various quarters. The script's architecture adheres to strict coding standards, ensuring reliable performance. By marking major and intermediate levels on charts, it provides traders with a systematic framework to analyze price behavior, supporting efficient trading decisions.

πŸ‘‰ Read | Freelance | Share!

#MQL5 #MT5 #Strategy
πŸ‘22❀14⚑1πŸ‘Œ1πŸ‘¨β€πŸ’»1
Understanding data types and operators is crucial for MQL5 development. In strongly-typed languages like MQL5, operations can yield different outcomes based on data types. For instance, dividing integers results in an integer, potentially causing confusion for newcomers. Typecasting remedies this by converting integers to floating-point values, ensuring expected results. Furthermore, programmers must grasp integer representation in memory. The concept of bit width explains range limitations for data types, impacting operations and potential errors. Logical operators, evaluating conditions, complement arithmetic operations, providing a framework for understanding computational logic within the programming environment. Exploring these topics helps avoid common pitfalls.

πŸ‘‰ Read | VPS | Share!

#MQL5 #MT5 #Education
πŸ‘39❀15⚑2πŸ‘Œ2πŸ‘¨β€πŸ’»1
An EA has been developed to autonomously close BUY and SELL orders independently, using user-specified profit percentages tied to the account balance. This tool enables traders to establish distinct profit targets for both types of positions. By doing so, it manages each market side separately, concluding trades once their specific profit objectives are met. Furthermore, users can monitor individual BUY and SELL profits directly on the chart. This feature provides real-time visual feedback to effortlessly track trade performance, ensuring a more organized trading approach.

πŸ‘‰ Read | Forum | Share!

#MQL4 #MT4 #EA
πŸ‘31❀14⚑5πŸ†3πŸ‘Œ1πŸ‘¨β€πŸ’»1
Gann's Square of 9 remains a standout in market analysis for its geometric and numerical approach, offering insights into price levels and time cycles. We've outlined how to translate this historic tool into the digital age with an indicator for MetaTrader 5. This involves coding sophisticated algorithms in MQL5 to represent Gann's spiraling number sequence as a visual trading tool. The indicator aids in determining key support and resistance levels and relevant time intervals using dynamic price and time scales. Additionally, this digital adaptation captures the modern acceleration of market cycles, thus serving both experienced traders and newcomers seeking to integrate advanced technical analysis into their strategies.

πŸ‘‰ Read | Docs | Share!

#MQL5 #MT5 #AlgoTrading
❀42πŸ‘35😁3πŸ‘Œ3πŸ‘¨β€πŸ’»1
The ADXm (experiment) has been adapted for MetaTrader 4 following its initial setup in MetaTrader 5. Those interested in the details of its functionality and implementation should review the information provided in the MetaTrader 5 release. This adaptation aims to bring the features of the ADXm to MetaTrader 4, allowing users of this platform to leverage its capabilities. It is important for users to understand the background and application of this version to make effective use of it in their trading strategies. Reference to the original MetaTrader 5 information will provide valuable insights into utilizing this tool effectively.

πŸ‘‰ Read | Signals | Share!

#MQL4 #MT4 #ADXm
πŸ‘28❀9✍2πŸ‘¨β€πŸ’»2⚑1πŸ‘Œ1
Explore the Kalman filter's potential in algorithmic trading for forex markets. As a recursive estimator, it filters noise and predicts financial time series, aiding strategies like mean reversion. The article guides on implementing this filter in MetaTrader 5, comparing its effectiveness with moving averages. Through backtesting, it reveals how the Kalman filter and moving averages enhance mean-reversion strategies, offering unique insights for both traders and developers. Although not superior, the Kalman filter provides distinct filtering advantages, emphasizing its unique role in trading algorithm development. Delve into this advanced tool for refining trading strategies and boosting profitability.

πŸ‘‰ Read | Signals | Share!

#MQL5 #MT5 #AlgoTrading
πŸ‘24❀11πŸ‘Œ2πŸ‘¨β€πŸ’»1
The article outlines the development of an Expert Advisor for the Trend Flat Momentum Strategy using MQL5. This strategy uses a combination of moving averages and momentum indicators like RSI and CCI to identify market trends. Key steps include creating the strategy blueprint, implementing the logic, backtesting, and optimizing in MetaEditor.

Moving average crossover and momentum indicators serve to confirm buy or sell signals, with dynamic risk management for stop loss and take profit. Implementation focuses on accurate code structure and error handling, while also improving trade efficiency by refining pivot detection methods.

Backtesting ensures robustness, with optimizations addressing initial issues in swing point detection. The completed system provides structured entry and exit, although profitability isn't guaranteed without thorough testing.

πŸ‘‰ Read | Quotes | Share!

#MQL5 #MT5 #EA
πŸ‘35❀13πŸ†2πŸ‘Œ1πŸ‘¨β€πŸ’»1
Neural networks are often misunderstood. Despite their complexity, they fundamentally operate as advanced mathematical models, not as an independent intelligence. They process data by fitting it to equations, allowing them to classify new, similar datasets effectively. When data is unprocessed, neural networks go through a training phase to identify patterns.

In starting out with neural networks, one can illustrate key concepts using a single neuron. Initially, the neuron receives random data and computations begin with arbitrary values. The goal is to refine these values until the neuron can recognize patterns and produce accurate outputs. The weight and error calculations guide this learning process.

Incorporating secant lines within neural network algorithms is crucial here. The secant line helps the network directly address errors, facilitating accurat...

πŸ‘‰ Read | AppStore | Share!

#MQL5 #MT5 #NeuralNet
πŸ‘42❀27⚑3πŸ‘Œ3πŸ‘¨β€πŸ’»3😁2πŸ€”2
The described indicator operates by examining a series of Simple Moving Averages (SMA) across a specified range of periods at each bar to identify the most recent bounce, either upward or downward. This process involves checking all SMA periods from a defined minimum to maximum range. If no discernible bounce is detected, the bar remains unaltered.

The main function of this tool is to assess market momentum. When both upper and lower lines contain values, this suggests potential range-bound market conditions. However, the requirement for significant computational resources is a notable challenge. Utilizing an extensive range of MA periods or switching to more complex moving average methods could lead to delays in the indicator's loading time. Once initialized, only the latest bar needs updating. Efficient computation is crucial for optimal performance.

πŸ‘‰ Read | CodeBase | Share!

#MQL5 #MT5 #Algorithm
❀19πŸ‘11πŸ‘¨β€πŸ’»5πŸŽ‰2⚑1✍1πŸ‘Œ1
Programming optimization and clarity are priorities when defining variables and arrays in your EA. Begin by aligning initial variable names to those used in subsequent code lines. For instance, assign a specific variable, such as `g_rates`, to represent `MqlRates`, incorporating functionalities like open, close, high, and low of candles. Use a placeholder variable "i" for referencing specific candles, e.g., `CANDLECLOSE(3)` for candle 3's close price.

To fetch ASK and BID values, utilize `MqlTick` or `SymbolInfoDouble` for consistent results. Define arrays for moving averages, ATR, and other indicators while maintaining `AsSeries` for essential operations. Adjust #define statements according to your EA's requirements without affecting subsequent code.

Understanding candle features is crucial, particularly for price-action based EAs. Definitions include W...

πŸ‘‰ Read | AlgoBook | Share!

#MQL5 #MT5 #EA
πŸ‘25❀14πŸ€”1πŸ‘Œ1πŸ‘¨β€πŸ’»1
Algae, with their ancient origins and essential roles in ecosystems, inspire innovative mathematical models like the Artificial Algae Algorithm (AAA). Proposed in 2015, AAA models algae’s natural behaviors via three key processes: spiral movement, evolutionary process, and adaptation. Each algae colony serves as a candidate solution in optimization problems, with movement mimicking nutrient-seeking behavior. The evolutionary process fosters growth in suitable conditions, and adaptation allows suboptimal colonies to imitate successful ones. The algorithm's implementation involves initializing populations and key parameters, executing spiral movements, managing energy dynamics, and leveraging tournament selection for movement. This process results in a robust optimization framework based on biological dynamics.

πŸ‘‰ Read | CodeBase | Share!

#MQL5 #MT5 #Algorithm
πŸ‘18❀10🀨3πŸ‘Œ2πŸ‘¨β€πŸ’»2
Explore how to create a custom Heikin Ashi indicator in MQL5 that's both educational and practical for traders. Learn the method to calculate Heikin Ashi values, derive the HA Moving Average, and effectively integrate these into trading strategies using the iCustom() function. This includes defining entry conditions via Heikin Ashi and MA crossovers, and implementing risk management by dynamically setting stop-loss and take-profit levels with HA calculations. Such an approach also includes a trailing stop mechanism utilizing Heikin Ashi patterns to secure profits, offering clear insights into market movements, enhancing decision-making, and streamlining trading strategies.

πŸ‘‰ Read | AlgoBook | Share!

#MQL5 #MT5 #Indicator
πŸ‘41❀16πŸŽ‰2πŸ‘¨β€πŸ’»2πŸ‘Œ1
The MQL4 indicator offers two methods for calculating and displaying the Rate of Change (ROC). The first method is the Percentage-Based ROC, which measures price changes as a percentage of the closing price from n periods earlier. This approach is effective for identifying momentum shifts among various symbols. The second method is the ATR-Adjusted ROC, which introduces a normalization factor by dividing the ROC by the Average True Range (ATR) over a specified period. By accounting for volatility, this method facilitates better momentum comparisons across different assets. The indicator is valuable for traders seeking to visualize price momentum, both with and without volatility adjustments, offering versatility for multiple trading strategies. Available as a free, open-source tool.

πŸ‘‰ Read | AppStore | Share!

#MQL4 #MT4 #Indicator
πŸ‘23❀12πŸ”₯5πŸ‘¨β€πŸ’»2πŸ‘€2πŸ‘Œ1πŸ†1
The expert advisor (EA) aims to facilitate extensive market data gathering from a user's broker by leveraging tick data extraction. It systematically identifies market watch symbols, acquiring all available ticks or those up to a specified date. This functionality is vital for comprehensive backtesting or custom chart creation, with the caveat of adequate storage requirements given the data volume.

Structuring is handled by CDownloadManager, designed to manage download operations effectively. Key elements include tracking download states, symbol lists, and indexing current symbols under scrutiny. Efficient file operations are critical, entailing two primary functions for reading and writing strings in a binary format to manage symbol data seamlessly.

Initialization within the manager involves identifying active market watch symbols and populating them into ...

πŸ‘‰ Read | Calendar | Share!

#MQL5 #MT5 #EA
πŸ‘25❀11πŸ‘¨β€πŸ’»3πŸ‘Œ2
Selective trading systems leverage machine learning to improve precision and recall in time series classification for MetaTrader 5 developers. By employing a combination of two classifiers, the approach addresses challenges in model adaptability and error correction. The metamodel enhances recall by filtering false positives, thereby refining the precision of the base model's trade triggers. Iterative training and the creation of a "bad samples book" allow models to identify and exclude poor trading examples, steadily enhancing model accuracy. This method helps automate optimal trading times and reduces dependence on specific human-chosen features, offering a promising solution to the volatile nature of financial markets.

πŸ‘‰ Read | AlgoBook | Share!

#MQL5 #MT5 #Algorithm
πŸ‘38❀19πŸ‘¨β€πŸ’»5πŸ”₯4πŸ‘€4😁1πŸ‘Œ1
The ADXm indicator is well-known in the trading and coding community, and several versions of it exist within the code base. These include iterations such as the Smoothed ADXm, MTF VHF Adaptive ADXm, and others with similar adaptive capabilities. A common characteristic noted with ADXm is its tendency to become erratic during a ranging market.

Various smoothed versions have been developed to mitigate this issue. An innovative approach involves applying the ADXm calculation recursively to itself, rather than traditional smoothing methods. This unique approach appears effective, warranting its presentation in the current context.

Considerations for use include interpreting color changes for momentum or trend shifts and utilizing zero line crossings similarly. In the ADXm of ADXm mode, it is important to note that while slopes remain consistent, values...

πŸ‘‰ Read | VPS | Share!

#MQL5 #MT5 #Indicator
πŸ‘34❀16✍3πŸ‘Œ3😁2πŸ‘¨β€πŸ’»2
The Bull's Power indicator is a tool developed by Alexander Elder to measure market bullishness. This oscillator evaluates demand and supply forces by calculating the difference between the highest value over a period and the exponential moving average (EMA). When the Bull's Power value falls below zero, it suggests weakening bullish strength.

Understanding this indicator can be enhanced with strategies that provide actionable insights. One strategy involves identifying signals by comparing current and previous Bull's Power values. Another strategy focuses on strong movements or divergences by analyzing high values and Bull's Power efficacy. Automated systems can harness these strategies for more precise trading decisions.

πŸ‘‰ Read | Forum | Share!

#MQL5 #MT5 #Indicator
πŸ‘67❀30πŸ‘¨β€πŸ’»5✍3πŸ‘Œ3
Managing multiple strategies within a single account requires precision. Identifying individual strategy performance without magic numbers involves difficult tracking through comments or ticket ranges. Magic numbers offer a structured approach by tagging trades, assisting in quickly identifying strategy performance. This insight facilitates decisive actions such as suspending underperforming EAs or reallocating resources to successful strategies.

Having a unified view simplifies analysis and logging. With a panel aggregating closed profits, deal counts, and comments, it aids in record-keeping, strategy optimization, and client reporting.

For implementation, attach the Script/EA to any MT5 chart. Upon compilation, a table with magic numbers is generated. Consider chart size and font alignment for readability. Adjust the script timing for preferred update fr...

πŸ‘‰ Read | Forum | Share!

#MQL5 #MT5 #Strategy
πŸ‘26❀18πŸ€“11πŸ‘¨β€πŸ’»3⚑1πŸ‘Œ1