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
Matrix factorization in MQL5 offers significant power via its API, providing crucial tools for machine learning in trading. Understanding linear algebra is essential to effectively use this API. A systematic introduction to these mathematical principles allows developers to create more precise and efficient trading algorithms, enhancing model performance.

By coding with linear algebra in mind, developers reduce complexity and improve maintainability. Efficient code structure reduces processing time and increases scalability. The application of matrix operations instead of loops minimizes error accumulation and memory strain.

Linear algebra aids traders in effectively processing large data sets while minimizing execution time, allowing for ongoing model refinement and optimization. Precision and proper utilization of defined methods are key to ...

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL5 #MT5 #LinearAlgebra
❀33πŸ‘Œ4✍3⚑2πŸ‘1πŸ‘¨β€πŸ’»1
The CTradingButtons class, integral to the News Headline Expert Advisor (EA), offers a user-friendly, chart-based interface for manual trading. It provides rapid trade execution and position management during news events and scalping. The class encompasses key segments: class declaration, initialization, button creation, and event handling.

Class Declaration: This section establishes CTradingButtons with private and public members for managing the button panel and trade operations, offering a modular foundation with configurable risk parameters.

Initialization (Init): This function sets up trading and GUI components, distinguishing manual trades with a unique magic number and ensuring interface readiness upon EA loading.

Button Creation (CreateButtons): It constructs and arranges eight critical trade execution buttons, facilitating immediate interaction, un...

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #EA
❀81πŸ‘4✍2πŸ‘¨β€πŸ’»1
A method for analyzing historical equity through one-time open virtual positions assists in evaluating spread and equity trading performance. The main goal is to determine volatility-flattening constructs and recognize entry and exit points for equity trades. Volume and direction are fixed per active pair, with cumulative profit or loss calculated, then represented as an equity line. Implementation involves setting volumes, directions, and pair activations, with optional initial balances. Note that the calculations disregard spread, commission, and swaps. The current version limits symbol counts and may lack optimization. This model serves as an initial experiment to refine profit extraction techniques from spread/equity trading. Future steps include enhancing visual analysis using indicators like Bollinger Bands and developing a customizable dashbo...

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #AlgoTrading
❀35πŸ‘4πŸ‘Œ2πŸ‘1πŸ‘¨β€πŸ’»1
This article delves into the versatile applications of the Moving Average (MA) indicator within MetaTrader 5. Key techniques include using the MA for trend identification by analyzing candle positions relative to the MA line, employing it as support/resistance, and exploring the MA's slope to gauge momentum. The text suggests that MA channels can enhance signal reliability by accommodating volatility using levels or ATR-influenced boundaries. Incorporating multiple MA curves with differing periods can refine market entries by evaluating their relative positions and directional alignment. These insights can empower traders and developers to craft more robust algorithmic trading strategies.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #Strategy
❀70πŸ‘8✍1πŸ‘¨β€πŸ’»1
Attention to server time changeover discrepancies is critical for precise trading operations. The FOREX session spans 120 hours from Sunday 17:00 to Friday 17:00 EST. Challenges arise due to differing time change dates between regions, notably the USA and EU. The USA shifts on the second Sunday in March and the first Sunday in November. Conversely, the EU transitions on the last Sunday of March and October, leading to temporary differences in the usual time offset between regions such as London, Frankfurt, and Cyprus. These discrepancies should reflect in the adjusted timestamps for Forex sessions' start and end times. Issues have been observed with the first session hour consistently showing as Monday at 00:00, instead of adjusting to 23:00 Sunday after US time changes. A script has been developed to verify and log any inconsistencies in broker time changes...

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #Forex
❀42πŸ‘4πŸ†2πŸ‘¨β€πŸ’»2πŸ‘Ύ2
Transform your MetaTrader 5 charts with dynamic background images for a more engaging trading experience. This advanced solution uses Object-Oriented Programming principles, allowing seamless integration with existing scripts or indicators. Store images in the FILES>WALLPAPERS directory for efficient access, opting for 24 or 32-bit BITMAP formats for compatibility and ease of use. The code supports on-the-fly switching of images, eliminating the need for recompilation. It integrates efficient resizing algorithms to maintain aspect ratios, ensuring visual clarity. Enhance your trading environment with customizable, motivational visuals while maintaining performance and data visualization integrity.

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #Trading
❀82πŸ‘9πŸ‘¨β€πŸ’»3πŸŽ‰1🀩1πŸ†1
Time discrepancies during the transition between daylight saving time and standard time are prevalent in the FOREX market and can impact trading strategies. The issue arises because different regions switch times on different Sundays. In the US, this occurs on the second Sunday in March and the first Sunday in November. Whereas, in the EU, changes occur on the last Sundays of March and October. This mismatch creates a temporary alteration in the time difference, affecting the FOREX session's start and end times and impacting trade execution.

A FOREX session spans 120 hours, starting on Sunday at 5:00 pm EST and ending the following Friday. These shifts can cause confusion in trading hours, leading to a missed hour at the beginning of a week on some broker platforms. This inconsistency results in a missing trading hour, affecting traders’ or advisors’ respon...

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL5 #MT5 #script
❀34πŸ‘¨β€πŸ’»6πŸ‘2⚑1πŸ†1
Are you interested in building a framework for statistical arbitrage trading suitable for retail traders? This concept focuses on creating a strategy that minimizes dependence on execution speed, making it achievable on a typical consumer setup. The approach involves using cointegration tests like Engle-Granger and Johansen to construct a coherent portfolio, focusing on sectors like semiconductors. By choosing stocks with high intra-group correlation, you ensure robustness against market shifts. Techniques like Johansen eigenvector weighting help maintain a stable relationship among assets, critical for market-neutral strategies. Implement these principles in your MetaTrader 5 algorithm to explore promising trading opportunities.

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #Trading
❀20πŸ‘4πŸ‘¨β€πŸ’»4
Position sizing remains a crucial factor in effective trading, significantly impacting a strategy's overall success and emotional toll on traders. In risk management, conventional wisdom advises risking 1%-2% of an account balance on individual trades, a guideline primarily aimed at preserving capital and minimizing emotional distress during losing streaks.

For traders, especially those handling smaller accounts, the temptation to exceed these recommendations for rapid growth is ever-present. Yet, the risk of substantial loss calls for a cautious approach. Monte Carlo simulations provide insight, quantifying how varying risk levels affect trading outcomes, drawdowns, and the probability of an account blowout.

In experimenting with different position sizing models, traders must remain aware of their emotional resilience and financial goals. A...

πŸ‘‰ Read | Forum | @mql5dev

#MQL5 #MT5 #RiskManagement
❀27πŸ‘¨β€πŸ’»3πŸ‘2πŸ‘Œ1
The MetaTrader5-Python package allows Python developers to create trading applications for MT5, offering data access and trade monitoring, independent from MQL5. However, it lacks a Strategy Tester for Python-developed trading bots. Addressing this, the article outlines the construction of a Python trading simulator akin to MT5's Strategy Tester. It involves tracking trades, validating trade criteria, and simulating market conditions. This simulator class manages positions, orders, and deals, vital for testing trading strategies with Python. Beyond simulating positions, features include order modification, profit/loss calculation, and real-time market price monitoring, emulating the decision-making traders encounter in a live market environment.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #Trading
❀36πŸ”₯6πŸ‘5πŸ‘¨β€πŸ’»5✍3πŸ†2
Implementing new features into existing systems often involves enhancing user interaction and improving usability. In Part 8, the focus was on making a multi-symbol dashboard in MQL5 more user-friendly by integrating draggable and minimizable features, along with interactive and hover-responsive buttons. These updates are crucial for providing flexibility in interface layout and quick access to dashboard functions.

Incorporating draggable functionality requires considering mouse event handling, which enables positioning adjustments without losing core real-time data tracking. Interactive button design for actions like close, toggle, and export, combined with hover effects, ensures improved user navigation and visual feedback during trading activities.

The upgraded structure demands organized naming for UI components and optimized event handling st...

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #Dashboard
❀46πŸ‘¨β€πŸ’»6⚑3
Introducing a versatile multi-timeframe dashboard scanner for RSI and Stochastic analysis. This tool displays both the main and signal lines of the Stochastic indicator. With integrated input elements directly on the chart, users can conveniently specify the desired RSI period and Stochastic settings. By clicking the update option, users can refresh the indicators to reflect the values set on the chart input efficiently. This ensures accurate and customized technical analysis based on user preferences, providing a streamlined experience for monitoring market conditions across multiple timeframes. The self-contained input functionality simplifies adjustments without leaving the chart interface.

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL4 #MT4 #RSI
❀38πŸ‘Ύ7πŸ‘6πŸ‘¨β€πŸ’»5πŸ€”1
Dive into the latest advancements in MetaTrader 5 development with improvements in handling form object movement. The article introduces a refined approach for interacting with forms, creating a flag system to distinguish active forms on charts, enhancing mouse interaction capabilities. Discover how the addition of trade server error codes and properties like "StopLoss" and "TakeProfit" informs deal objects, boosting error handling and property management accuracy. Explore practical implementations of graphical object handling, focusing on precise mouse-event tracking and interaction. These updates streamline the user experience for developers, offering more robust and intuitive tools for algorithmic trading environments.

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #AlgoTrading
❀69πŸ‘10πŸ‘¨β€πŸ’»6✍4
The tool efficiently identifies and plots Fibonacci levels using ZigZag-based price cycles. It offers customizable parameters, including timeframe, number of bars, and Fibonacci line colors. Users can adjust label visibility and line styles to fit their needs. Multiple Fibonacci levels, such as 23.6%, 38.2%, 61.8%, and 161.8%, are supported, allowing users to set a minimum display level. The option to toggle ZigZag visibility and switch between body-to-body and wick-to-wick drawing modes adds flexibility. The tool is lightweight, providing optimized real-time chart analysis. Input parameters include timeframe and number of bars for calculation, as well as ZigZag tuning settings.

To use, simply add the indicator to your chart, customize parameters according to your trading style, and utilize Fibonacci levels to identify support or resistance zones. ...

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL5 #MT5 #Indicator
❀23πŸ‘5πŸŽ‰2πŸ‘¨β€πŸ’»2⚑1πŸ”₯1πŸ‘Œ1
A new library offers efficient handling of tick storage formats, optimized for size and speed. It retains essential MqlTick fields and can be integrated into your workflow using MetaEditor shortcuts. The library facilitates writing to and reading from files, demonstrating impressive compression capabilities with a 10:1 ratio that preserves data integrity.

An accompanying script benchmarks this process, achieving over 40 million ticks per second. The modular nature of this library supports flexibility and maintains original tick data during conversions, making it a robust solution for developers requiring high-performance data handling. Explore further solutions to enhance your technical projects with innovative alternatives provided in the source.

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #Algorithm
❀32πŸ‘¨β€πŸ’»3πŸ‘2
The VAR Volume Indicator for MT5 is a technical instrument designed to assess price movements within the Value Area, typically representing 70% of the Market Profile's volume range. It focuses on crucial price zones and major profile extremes. The Volume-at-Price feature aligns price levels with associated volume data on the X-axis, revealing liquidity clusters. The Retracement Logic identifies possible pullbacks into high-volume nodes within the Value Area, signaling potential market reversals or continuations.

This tool combines Market Profile elements, like brackets and profile highs, with volume profiling to detect institutional activity and significant retracement zones. Alphanumeric sequences within the indicator may offer time-price-volume mappings for algorithmic testing. Traders, including scalpers and swing traders, utilize the VAR Indicator...

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #Indicator
❀19πŸ‘8πŸ‘¨β€πŸ’»6πŸ‘Œ1
Explore the key technical aspects of leveraging DirectX within MQL5 for algorithmic trading applications. This involves understanding the Direct3D device framework, input layouts, and primitive topology for rendering graphics. The discussion highlights the integration process of HLSL shaders to optimize graphics rendering pipelines. By comprehending these structures, traders and developers can utilize GPU resources efficiently, enhancing visual data interpretation in trading platforms. The step-by-step guide demystifies DirectX's complexity while maintaining robust control over graphic components. This article serves as a practical resource for implementing advanced graphical features, crucial for developing sophisticated trading bots and enhancing user interface visuals.

πŸ‘‰ Read | AppStore | @mql5dev

#MQL5 #MT5 #DirectX
❀72πŸ‘8πŸ‘€8✍6πŸ†5πŸŽ‰4πŸ‘¨β€πŸ’»1
Introducing a grid-based system designed for traders seeking to effectively manage order placement. This expert advisor facilitates the creation of an order grid without relying on martingale strategies, offering flexibility with standard, lite, or full martingale options. Users are encouraged to conduct tests to identify optimal settings, as default configurations serve merely as a foundational guide to the system's operations.

The expert supports both aligned and opposing order grid configurations. When facing significant losses, the hedge mode option is available for added control. Given the inherent high-risk nature of this strategy, it is advisable to perform initial tests in a demo trading environment to evaluate performance and stability.

πŸ‘‰ Read | VPS | @mql5dev

#MQL4 #MT4 #EA
❀36πŸ‘€4⚑2πŸ‘1πŸ‘¨β€πŸ’»1
A new expert advisor has been developed to assist traders in creating an order grid. The system avoids martingale, lite martingale, and full martingale methods, offering straightforward operation. Users are encouraged to conduct their tests to determine optimal settings. Default settings serve as an initial guide for comprehension. The expert allows configuration to build either conforming or opposing order grids. Additionally, a hedge mode is available to manage significant losses. The strategy is noted for its high-risk potential. It is advisable to first evaluate its performance on a demo account to ensure thorough understanding before full deployment.

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #EA
❀30πŸ‘Œ5πŸ‘¨β€πŸ’»3
Navigating multi-pair trading can be challenging due to varying volatility. This article addresses these issues by leveraging a dynamic Expert Advisor (EA) that incorporates volatility-based risk management. By using tools like Average True Range (ATR) and dynamic risk-based sizing, the EA adjusts trade parameters according to market conditions. This ensures consistent risk management and improved performance across diverse currency pairs. Key features include multi-symbol handling, volatility-driven risk tiers, and real-time adaptability to market shifts. Practical for both traders and developers, this EA mitigates risk in volatile markets while optimizing opportunities in stable environments, providing a comprehensive strategy for more predictable outcomes.

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #EA
❀35πŸ†4πŸ‘¨β€πŸ’»4