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
In the realm of AI-powered forecasting systems, the importance of data pre-processing cannot be underestimated. Effective pre-processing techniques such as standard scaling, min-max scaling, robust scaling, and one-hot encoding are crucial for enhancing the performance of machine learning models. These techniques ensure that raw financial data becomes 'model-ready,' addressing issues like differing scales, outliers, and categorical features. Within the Python ecosystem, sci-kit learn provides powerful tools for pre-processing. However, MQL5 lacks these native methods, prompting developers to build reusable classes that emulate this functionality. Such pipelines improve data consistency, maintainability, and ultimately the robustness of trading algorithms, blending Python's proficiency with MQL5's capabilities.

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #Data
❀59πŸ‘Œ10πŸ‘5πŸ‘€4πŸ€”2✍1πŸ‘¨β€πŸ’»1
The ability to cycle through timeframes using the 'N' and 'M' hotkeys in MT4 and MT5 offers an efficient method for navigating chart data quickly. Users can utilize 'N' for the next timeframe and 'M' for the previous one, streamlining the analysis process without manual menu selections. This functionality is beneficial for those who require rapid access to various timeframes during analysis. Efficient navigation between timeframes assists in maintaining focus on data interpretation and decision-making. Customization of workflow through such shortcuts can significantly enhance productivity for traders and analysts. Regular use of these shortcuts can lead to a more streamlined and effective chart analysis experience.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #Hotkeys
❀32πŸ‘¨β€πŸ’»4πŸŽ‰3πŸ‘2
Welcome to the continuation of the MQL5 series, focusing on automating the detection of the Gartley harmonic pattern. This relies heavily on Fibonacci levels, price swings, and chart objects. The EA will evaluate price swings, calculate significant Fibonacci retracement and extension levels, and identify possible Gartley formations on a chart. These concepts also apply to other harmonic patterns, including the Bat and Butterfly.

For buy logic, the EA detects bullish Gartley patterns by analyzing points X, A, B, C, and D to match specific retracement rules, then generates a buy order anticipating price reversals. Users can adjust retracement and extension settings.

In the bearish logic, the EA searches for a swing high at point X, followed by identifying points A, B, C, and D to confirm a valid bearish Gartley pattern based on predefined criteria and...

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #Trading
❀32πŸ‘Œ4πŸ‘2πŸ‘¨β€πŸ’»2πŸ‘€2
Integrating AI into trading systems using MQL5 begins with a JSON parsing framework for API interactions. JSON's role as a data interchange format is crucial for AI API communication, exemplified by OpenAI's ChatGPT. Our focus is on developing a robust foundation for JSON data processing, enabling seamless AI-driven trading integrations.

Implementation involves creating the "JsonValue" class to handle JSON data types with functions for parsing and serialization. This class manages child elements, manipulates JSON structures, and handles errors efficiently. Methods for serializing and deserializing JSON further enhance interaction capabilities.

The understanding and handling of JSON structures are essential for the integration of AI into trading strategies. A solid groundwork is set, preparing for the advanced AI applications in trading automation.

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #AI
❀29πŸ†4πŸ‘3πŸŽ‰1πŸ‘¨β€πŸ’»1
Various securities interact through the lens of financial correlation, a dynamic concept, particularly during high-impact news events. The recent evolution of the News Headline EA introduces advancements aimed at incorporating correlation measures for informed trading. The expanded setup involves a two-step approach: enhancing the CTradingButtons class to compute and visualize correlation; integrating these features into the EA without disrupting existing components.

Financial correlation, expressed via the correlation coefficient (-1 to +1), is pivotal in assessing how two securities move relative to each other over selected time frames. This involves calculating the Pearson correlation coefficient over specified periods. The EA identifies if a security is a leader or a follower, which aids in strategy formulation.

Initial testing of these enhancement...

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #Strategy
❀37πŸ‘¨β€πŸ’»3✍2πŸ‘Œ2πŸ’―1
The recent article continues research on neural networks, specifically focusing on supervised learning using activation functions. By implementing a multilayer perceptron (MLP) with an embedded ADAM optimization algorithm, the article evaluates how different activation functions affect interpolation accuracy and convergence rate in neural networks. The neural network employs the hyperbolic tangent and various other functions.

Key components of the MLP implementation include the C_Neuro class for neurons, the S_NeuronLayer structure for neuron layers, and methods for importing and exporting weights. The study tests the modified ADAMm optimization method against the classical ADAM to determine the impact of activation functions on training efficiency.

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #NN
❀44πŸ‘6πŸ‘¨β€πŸ’»5⚑4πŸ‘Œ3πŸ”₯1πŸ’―1
The EA is equipped with key features focused on entry strategies, confirmation filters, dynamic exit logic, and configurable settings. It offers multiple entry strategies, such as classic overbought/oversold reversals and advanced RSI divergence signals. Confirmation accuracy is enhanced by utilizing an RSI centerline cross, helping reduce false entries.

Dynamic exit logic supports both Stop Loss and Take Profit, with trades closable based on RSI levels. Configurability allows for customization of RSI parameters, trade management settings, and strategy rules. Independent trade management is ensured through a unique Magic Number, avoiding conflicts with other robots or manual trades.

Entry signals options include RSI Divergence, Overbought/Oversold Reversal, and Centerline Confirmation as an optional filter. The EA's exit strategy employs both fixed and dyn...

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL5 #MT5 #EA
❀37πŸ‘¨β€πŸ’»3πŸ‘€1
The enhanced ZigZag tool is engineered to serve as a reliable visual reference for balancing or analyzing other indicators on both main and sub-charts. It operates exclusively with confirmed ZigZag values, ensuring that identified points maintain high reliability. Each movement detected by the ZigZag is supplemented with crucial information, including periods defined by the ZigZag, precise top or bottom pricing, directional movement, and pip count.

Customizable features include adjustable color, thickness, and style for the ZigZag, along with optional display controls. Visual markers use distinct colors for highs and lows, aligned perfectly with bars. Dynamic labels provide a clear display of prices and movements, representing direction with triangles and detailing pip counts.

Full control is granted through boolean parameters, allowing independ...

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #Indicator
❀24πŸ‘4πŸ‘¨β€πŸ’»4
Market trends are classified into three primary types: uptrend, downtrend, and sideways. In an uptrend, buyers predominantly control the market, resulting in incrementally higher prices. Conversely, a downtrend sees sellers dominating, pushing prices down to lower highs and lows. Sideways movement indicates a market balance where neither buyers nor sellers have complete control.

Understanding these trends is crucial for effective trading strategies and risk management. The Relative Strength Index (RSI) aids in analyzing market momentum, foreseeing potential movements, and determining points for strategic trade actions.

The RSI strategy involves different approaches based on current market trends, employing an algorithmic trading system facilitated by MetaTrader 5 and MetaQuotes Language Editor. Familiarity with RSI can enhance decision-making effectiveness...

πŸ‘‰ Read | Forum | @mql5dev

#MQL5 #MT5 #RSI
❀64πŸ‘Œ8πŸ‘6πŸ‘¨β€πŸ’»6
Enhance your workflow by using hotkeys for efficient navigation through timeframes. Utilize the 'N' key to move to the next timeframe and the 'M' key to revert to the previous one. This method allows for rapid analysis and seamless transitions between different data perspectives. Implementing hotkeys into platform usage aids in maintaining focus and reduces the need for manual timeframe adjustments via menus. Prioritize efficiency by integrating these shortcuts into your routine, facilitating a smoother experience when conducting technical analysis or evaluating market trends.

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL4 #MT4 #Script
❀33πŸ†4πŸ‘¨β€πŸ’»3⚑1
The Envelopes indicator serves as a tool in band trading, marking moving averages with two bands for more informed trade decisions. This technical indicator helps filter trend movements and assess sideways market conditions. Calculation involves setting a fixed percentage from the moving average, useful in filtering both upward and downward price swings. The approach includes strategies for uptrend, downtrend, and sideways conditions, each dictating specific actions such as buy, short, or take profit. Implementing these strategies with MQL5 in MetaTrader 5 facilitates automatic signal detection. Such coding streamlines the trading process, enhancing decision-making efficiency.

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #Algorithm
❀79✍11πŸ‘Œ3😱2⚑1πŸ‘1πŸŽ‰1
The elegant oscillator, originally developed for MetaTrader 5, is now available for MetaTrader 4. This tool provides traders with improved insights into market trends and dynamics. Users should apply the same recommendations and settings as defined in the MetaTrader 5 description to ensure optimal performance. This indicator assists in identifying potential entry and exit points by analyzing market momentum. Make sure to integrate it into your trading strategy to enhance decision-making processes. Proper calibration is crucial for achieving accurate results. Regular updates and evaluations are suggested to maintain its efficiency in varying market conditions.

πŸ‘‰ Read | AppStore | @mql5dev

#MQL4 #MT4 #Indicator
❀37πŸ†2πŸ‘¨β€πŸ’»2✍1
The concept of neurosymbolic systems combines classic trading patterns with neural networks to enhance algorithmic trading. Traditional patterns like "head and shoulders" are well-known but can fail as markets evolve. Neural networks such as LSTM provide powerful predictions but lack transparency in decision-making. By integrating these two approaches, a neurosymbolic system can adapt to market changes while maintaining a framework of rules.

Pattern analysis in trading involves encoding price movements as binary sequences. Patterns can be evaluated by their frequency, win rate, and a reliability metric to avoid statistical anomalies. Proper analysis requires balancing pattern length and forecast horizon for effective predictions.

In neural network architecture, LSTMs are suitable for time-series market data. A hybrid setup with LSTM and dense ...

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #Neurosymbolic
❀34πŸ†4πŸ‘2πŸ‘¨β€πŸ’»2
Effective use of statistics transforms raw market data into actionable insights. The Price Action Analysis Toolkit elevates candlestick data by compressing multiple bars into significant price levels, offering enhanced clarity on market behavior. Employing the typical price (TP) concept, which averages high, low, and close prices, enables more stable and informative statistical analysis. This approach yields metrics such as mean, median, mode, and variance, effectively guiding price action analysis.

The development and integration of statistical signals into trading strategies provides a systematic method for interpreting price movement. Using a strategy like the KDE Level Sentinel EA in MQL5 allows for clear, reproducible trading signals. These insights assist in identifying strategic entries and exits, supported by precise computation and reliable...

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #Strategy
❀21✍11πŸ‘¨β€πŸ’»2
In the realm of MQL5 programming, transitioning from manually handling SQL to using ORM can optimize data operations remarkably. Initially, we explored setting up databases, focusing on SQL commands within MQL5 scripts to handle basic tasks like table creation, data manipulation, and transaction management. Such an approach laid the foundation, but posed challenges as systems scaled: code verbosity, repetition, and potential errors increased.

Moving towards an ORM (Object-Relational Mapping) system can streamline these operations, representing database tables as classes. Utilizing the MQL5 preprocessing feature #define significantly aids in this by automating class generation, reducing redundancy, and enhancing maintainability.

The macro capabilities in MQL5 provide powerful tools beyond text substitution, enabling the creation of structured entity classes t...

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #ORM
❀39✍3πŸ‘Œ3⚑1πŸ”₯1πŸ‘¨β€πŸ’»1
Discover how the evolution of Parafrac oscillators can enhance your algorithmic trading strategies. By standardizing PSAR-price gaps using fractal range and ATR, these tools unveil distinct trend structures. An in-depth comparison of Parafrac and Parafrac V2 across three strategiesβ€”Zero-Line Cross, Histogram Momentum Shifts, and Histogram-Candle Combinationβ€”reveals their strengths. Backtesting on GBP/USD H1 highlights how the ATR-based Parafrac V2 offers higher profitability under specific conditions, while the original excels in select scenarios. Learn how optimizing parameters like stop loss and Reward-to-Risk Ratio can refine performance, ensuring your algorithm responds effectively to market dynamics.

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL5 #MT5 #Strategy
❀42πŸ‘9πŸ‘Œ5πŸ†4⚑3πŸ‘2πŸ‘¨β€πŸ’»1
The Force Index, developed by Alexander Elder, is an analytical tool aimed at measuring the buying and selling strength of an asset. It is calculated using the formula: Force Index(1) = (current price - previous price) x current volume. For a smoothed version, the Force Index(13) is used, which involves calculating the EMA(13) of Force Index(1).

Traditionally, the Force Index acts as a zero-line cross indicator. However, it possesses additional features worth noting. It can effectively indicate impulsive moves, breakouts, and even reversal points on a chart. The enhanced assessment is achieved by applying volume and volatility bands, aiding in better analysis of market dynamics. These capabilities make it a versatile tool for technical analysis when identifying breakouts and reversals in range-bound markets.

πŸ‘‰ Read | Docs | @mql5dev

#MQL4 #MT4 #Indicator
❀35✍1πŸ‘Œ1πŸ†1πŸ‘¨β€πŸ’»1😎1
In part 2 of our series, the focus shifts to developing an AI-integrated program using MQL5, building on our existing JSON parsing framework. The program facilitates interaction with OpenAI's API directly on the MetaTrader 5 chart, offering AI-driven trading insights.

We cover setting up OpenAI API access, configuring MetaTrader 5 for HTTP requests, and the implementation of the ChatGPT program in MQL5. This includes creating a user interface with input fields and buttons for querying the AI, and displaying formatted responses on the chart.

Key steps involve obtaining an API key, performing curl tests to ensure API connectivity, and configuring MT5 settings for seamless communication with OpenAI. This comprehensive approach ensures robust AI interaction within a trading environment.

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #ChatGPT
❀38πŸ‘¨β€πŸ’»1
The development of a custom market sentiment indicator combining multiple timeframes enhances trading efficiency. By automating this indicator, traders benefit from consistent sentiment monitoring without emotional bias, promoting faster market reaction. The framework uses various technical elements like moving averages and price action analysis to classify sentiment into five categories: bullish, bearish, risk-on, risk-off, and neutral.

The execution logic warrants systematic trading decisions. Buy orders align with bullish or risk-on sentiment due to expected upward price momentum, while sell orders correlate with bearish or risk-off sentiment predicting downward trends. Neutral sentiment prompts trade avoidance to reduce high-risk entries in uncertain conditions.

Integration of MetaTrader 5's CTrade class facilitates automated trade execution. ...

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #Indicator
❀34⚑4πŸ‘¨β€πŸ’»3
Explore the geometric interpretation of machine learning models and their impact on trading strategies. Unlike traditional methods, which merely map inputs to outputs, these models embed target images onto a space defined by inputs, causing potential misalignment and irreducible errors. This nuance affects prediction accuracy, emphasizing the need for multi-step forecasts over direct comparisons. A practical case shows a 153% increase in profitability by leveraging such predictions. Key techniques include the use of ONNX models for cross-platform deployment and the refinement of strategies through analysis of model predictions, aligning coordinate systems for improved trading outcomes without altering the base model.

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #ML
❀34πŸ‘4πŸŽ‰2πŸ‘¨β€πŸ’»1