The Support and Resistance indicator for MetaTrader presents key market levels directly on the chart to aid in decision-making for stop-loss and take-profit points. This indicator utilizes the standard Fractals method by Bill Williams and is compatible with MetaTrader 4 and 5, offering no adjustable input parameters.
Key features include alert systems for price action relative to support or resistance levels. Alerts can be configured for native popups, emails, or push notifications. Email alerts require proper configuration in MetaTrader under Tools->Options->Email, while push notifications are set up under Tools->Options->Notifications. There is also the flexibility to select the TriggerCandle parameter, allowing alerts for either the most recently closed candle or the current active candle.
#MQL5 #MT5 #Indicator #AlgoTrading
Read more...
Key features include alert systems for price action relative to support or resistance levels. Alerts can be configured for native popups, emails, or push notifications. Email alerts require proper configuration in MetaTrader under Tools->Options->Email, while push notifications are set up under Tools->Options->Notifications. There is also the flexibility to select the TriggerCandle parameter, allowing alerts for either the most recently closed candle or the current active candle.
#MQL5 #MT5 #Indicator #AlgoTrading
Read more...
β€35π16π¨βπ»3β‘2β1
The Coppock MetaTrader indicator is a technical analysis tool designed for detecting long-term buy and sell opportunities. Created by Edward Coppock in 1962, it employs a weighted moving average method to analyze the sum of two rates of change. The classic version uses a 10-period moving average based on rates of change with periods of 14 and 11. This version for MetaTrader platforms, including MT4 and MT5, allows customization of these parameters.
Default settings include ROC1Period at 14 and ROC2Period at 11 for the rates of change, MAPeriod at 10 for the moving average, and MAType at 3 (WMA) for the moving average method in MT4. Modification of MAType is typically not recommended.
The strategy involves initiating buys when the curve ascends from a trough below zero and selling when it descends from a peak above zero. Smaller fluctuation peaks a...
#MQL5 #MT5 #Indicator #AlgoTrading
Read more...
Default settings include ROC1Period at 14 and ROC2Period at 11 for the rates of change, MAPeriod at 10 for the moving average, and MAType at 3 (WMA) for the moving average method in MT4. Modification of MAType is typically not recommended.
The strategy involves initiating buys when the curve ascends from a trough below zero and selling when it descends from a peak above zero. Smaller fluctuation peaks a...
#MQL5 #MT5 #Indicator #AlgoTrading
Read more...
π32β€19π4π¨βπ»2
Understanding the various components of a trading Expert Advisor (EA) can enhance automated trading strategies. Here are key points on the structure and logic of an EA using enums, input parameters, and essential functions:
Enums define signal types and order actions in the EA. `enumJnsSignal` distinguishes between a cross of two Moving Averages (eTypeCrossMA) and trend-following through Moving Averages and Stochastic (eTypeTrend). `enumOrderType` categorizes buy (`eBuy`), sell (`eSell`), or no action (`eNone`).
Input parameters personalize the EA's trading behavior. These include unique identifiers like `inMagicNumber`, trade size settings (`inLotSize`, `inMultiply`), grid strategies (`inJarakLayer`), and indicator customization such as MA and Stochastic values.
Key functions manage trading logic. Initialization occurs in `OnInit()`, ensuring MA settin...
#MQL5 #MT5 #EA #AlgoTrading
Read more...
Enums define signal types and order actions in the EA. `enumJnsSignal` distinguishes between a cross of two Moving Averages (eTypeCrossMA) and trend-following through Moving Averages and Stochastic (eTypeTrend). `enumOrderType` categorizes buy (`eBuy`), sell (`eSell`), or no action (`eNone`).
Input parameters personalize the EA's trading behavior. These include unique identifiers like `inMagicNumber`, trade size settings (`inLotSize`, `inMultiply`), grid strategies (`inJarakLayer`), and indicator customization such as MA and Stochastic values.
Key functions manage trading logic. Initialization occurs in `OnInit()`, ensuring MA settin...
#MQL5 #MT5 #EA #AlgoTrading
Read more...
π20β€12π¨βπ»3β‘2π2
Navigating volatile markets requires robust strategies; combining VWAP with Fibonacci retracement offers a dynamic approach for MetaTrader 5 developers. The integration of VWAP's volume-backed insights with Fibonacci's historical price levels enhances signal accuracy, reducing false alarms. This system operates through MQL5 EAs and a Python server, exchanging data to generate signals. A buy signal occurs when VWAP is below mid-range Fibonacci, and sell signals occur when above, aligning volume and price action. This solution offers traders precise decision-making tools and demonstrates technical synergy between MQL5 and Python for effective trading insights and visualization.
#MQL5 #MT5 #Fibonacci #TradingStrategy
Read more...
#MQL5 #MT5 #Fibonacci #TradingStrategy
Read more...
π27β€8π¨βπ»3π―2π1
Developing effective trading strategies relies heavily on accurate future price movement predictions. This precision is achieved using complex deep learning models that leverage inherent periodicity and trends in the data. Currency price movements often tie closely to specific trading sessions. Discretizing time series by these sessions reveals periodic and sequential trends, facilitating data decomposition.
This technique enables the development of lightweight forecasting models like SparseTSF. This model simplifies long-term forecasting to basic trend prediction, minimizes data complexity, and significantly economizes computational resources. SparseTSF represents a major innovation by employing minimal parameters while efficiently capturing the essential periodicity and trends of time series data.
#MQL5 #MT5 #Forecasting #AlgoTrading
Read more...
This technique enables the development of lightweight forecasting models like SparseTSF. This model simplifies long-term forecasting to basic trend prediction, minimizes data complexity, and significantly economizes computational resources. SparseTSF represents a major innovation by employing minimal parameters while efficiently capturing the essential periodicity and trends of time series data.
#MQL5 #MT5 #Forecasting #AlgoTrading
Read more...
β€21π10π¨βπ»3π3
Explore the innovative approach to algorithmic trading with our automated Order Block Detection System, crafted in MetaQuotes Language 5 (MQL5). This system leverages smart money concepts by identifying key institutional order blocks directly on trading charts, a shift from traditional indicators. Traders can now visually assess zones of potential market reversal or trend continuation, thanks to a structured methodology that emphasizes price structure over arbitrary indicators. The comprehensive guide outlines the system's development, including price action analysis, MQL5 implementation, and robust backtesting, providing a valuable resource for developing advanced trading algorithms aligned with market dynamics.
#MQL5 #MT5 #AlgoTrading #Strategy
Read more...
#MQL5 #MT5 #AlgoTrading #Strategy
Read more...
π37β€23π7β5π¨βπ»5π4π1
In the absence of a default event handling function for new bar openings in MetaTrader, developers must implement their own detection logic. By monitoring the opening time of the current bar, it becomes possible to react to a new bar formation when this time changes. The sample code provided for both MQL4 and MQL5 illustrates how to implement such a mechanism. It leverages a static variable to retain the barβs opening time across multiple OnTick() events, distinct from regular local variables which lose their state upon exiting the function. This is crucial for accurately detecting when a new bar begins. Additionally, care must be taken when initially deploying the Expert Advisor, as it will interpret the first run as detecting a new bar. Special handling may be required for this scenario based on specific needs. Access to the full source code of this functi...
#MQL5 #MT5 #EA #Algorithm
Read more...
#MQL5 #MT5 #EA #Algorithm
Read more...
β€24π18π1π¨βπ»1
In the series on mastering log records in MQL5, the focus has been on developing a custom log library to surpass the limitations of MetaTrader 5's native logs. Key aspects covered include creating a robust structure using the Singleton pattern, implementing advanced persistence for audit trails, and classifying logs by levels. Flexibility in log output formats allows developers to cater to specific project needs.
The latest development introduces caching and file rotation to enhance file-based log storage. By caching log messages, the library reduces disk I/O operations, boosting performance. File rotation, based on size or date, ensures logs are manageable by archiving older logs and preventing excessive accumulation.
Real-world applications have shown significant performance improvements with these enhancements. Performance tests revealed substantial r...
#MQL5 #MT5 #EA #AlgoTrading
Read more...
The latest development introduces caching and file rotation to enhance file-based log storage. By caching log messages, the library reduces disk I/O operations, boosting performance. File rotation, based on size or date, ensures logs are manageable by archiving older logs and preventing excessive accumulation.
Real-world applications have shown significant performance improvements with these enhancements. Performance tests revealed substantial r...
#MQL5 #MT5 #EA #AlgoTrading
Read more...
π23β€8π¨βπ»1
The article highlights key insights for developing effective trading strategies in MetaTrader 5. It advises on spotting unreliable Expert Advisors (EAs) by examining claims about AI integrations and mentions the pitfalls of look-ahead bias and misrepresented AI usage. To avoid overfitting, it suggests utilizing longer data periods and limiting tunable parameters during optimization. The piece stresses the importance of considering commission and spread impacts in backtesting, especially for high-frequency strategies. It also recommends in-sample and out-of-sample testing to ensure model robustness, focusing on maintaining a consistent profit factor and keeping drawdown within acceptable limits.
#MQL5 #MT5 #Strategy #AITrading
Read more...
#MQL5 #MT5 #Strategy #AITrading
Read more...
π22β€8π¨βπ»1
Recent research has highlighted limitations in deep learning-based time series modeling, noting that shallow networks or linear models often outperform them on certain benchmarks. As foundational models in NLP and CV advance, their adaptation to time series data remains a challenge. TEMPO is introduced as a generative pre-trained transformer model focused on time series forecasting. It uses GPT and a two-component analytical framework to address specific temporal patterns like trends and seasonality. TEMPO enhances prediction accuracy by decomposing time series data into components, enriching model performance through an innovative prompt-based approach. This approach combines trend, seasonality, and residuals for a cohesive forecasting solution.
#MQL5 #MT5 #TimeSeries #AITrading
Read more...
#MQL5 #MT5 #TimeSeries #AITrading
Read more...
π35β€33π¨βπ»2
The code framework consists of three main components for handling economic news data in MetaTrader 5.
1. CalendarRetriever.mq5 (Script): This script fetches historical economic news events and stores them in the "Common" folder of the terminal. It outputs files such as `Countries.txt`, `Events.txt`, and `News.bin`, which are crucial for backtesting. Input parameters include a start date and an end date.
2. CalendarFile.mq (Include File): This file structures news data management within an expert advisor. It features classes like `CalendarFileWriter` for data storage and `CalendarFileReader` for data retrieval and processing during trading.
3. NewsBacktest.mq5 (Expert Advisor): This component leverages the stored news data to simulate real-time conditions in the strategy tester. It uses functions like `LoadEvents()`, `LoadCountries()`, and `LoadValues(...
#MQL5 #MT5 #Script #Strategy
Read more...
1. CalendarRetriever.mq5 (Script): This script fetches historical economic news events and stores them in the "Common" folder of the terminal. It outputs files such as `Countries.txt`, `Events.txt`, and `News.bin`, which are crucial for backtesting. Input parameters include a start date and an end date.
2. CalendarFile.mq (Include File): This file structures news data management within an expert advisor. It features classes like `CalendarFileWriter` for data storage and `CalendarFileReader` for data retrieval and processing during trading.
3. NewsBacktest.mq5 (Expert Advisor): This component leverages the stored news data to simulate real-time conditions in the strategy tester. It uses functions like `LoadEvents()`, `LoadCountries()`, and `LoadValues(...
#MQL5 #MT5 #Script #Strategy
Read more...
β€25π13β‘2π€―1π¨βπ»1
Discover how to master JSON parsing in MQL5 without a built-in library. This article guides you through creating a flexible JSON reader for MetaTrader 5, ideal for integrating web API data and local configurations. It covers parsing essential JSON elementsβstrings, numbers, arrays, and objectsβand discusses converting MQL5 data structures into JSON. Practical use cases include fetching market data and transmitting trade logs. Learn to address challenges like special characters and whitespace handling. By the articleβs end, youβll craft a custom, robust JSON parser, enhancing your algorithmic trading strategies with dynamic configuration capabilities. Explore JSON integration seamlessly in your trading programs.
#MQL5 #MT5 #MQL5 #JSONParser
Read more...
#MQL5 #MT5 #MQL5 #JSONParser
Read more...
π17β€14π¨βπ»3β1π₯1
The construction of a custom Keltner Channel indicator in MQL5 requires an understanding of both its theoretical framework and practical implementation. This volatility-based indicator functions by using a Moving Average for centerline smoothing and an Average True Range (ATR) for the upper and lower bands, adjusting for dynamic support and resistance levels.
The development process involves decomposing the indicator architecture into core elements like input parameters, indicator buffers, and graphical properties. Buffers are utilized for storing the computed channel values, linked to graphical display components via MQL5 functions, ensuring adaptability to market volatility.
For visualization, custom canvas graphics enhance the indicator's output, providing a clearer, more informative trading tool. The modular design emphasizes separability of data...
#MQL5 #MT5 #Indicator #Strategy
Read more...
The development process involves decomposing the indicator architecture into core elements like input parameters, indicator buffers, and graphical properties. Buffers are utilized for storing the computed channel values, linked to graphical display components via MQL5 functions, ensuring adaptability to market volatility.
For visualization, custom canvas graphics enhance the indicator's output, providing a clearer, more informative trading tool. The modular design emphasizes separability of data...
#MQL5 #MT5 #Indicator #Strategy
Read more...
β€14π12π¨βπ»2π1
Soft Actor-Critic (SAC) is a powerful reinforcement learning algorithm known for its balance between exploration and exploitation. Central to SAC is the replay buffer, which stores diverse experiences for improved learning stability and efficiency. While simple implementations using Python lists or NumPy are effective for small problems, leveraging PyTorch or TensorFlow offers scalability and GPU acceleration.
The algorithm employs two critic networks to reduce bias and uses target networks for stability. Critic networks estimate Q-values crucial for policy updates, while the optional value network provides smoother targets. The actor network calculates action distributions aiding in exploration in continuous action spaces. For large-scale implementations, tensor-based approaches are superior in performance.
#MQL5 #MT5 #ReinforcementLearning #AlgoTrading
Read more...
The algorithm employs two critic networks to reduce bias and uses target networks for stability. Critic networks estimate Q-values crucial for policy updates, while the optional value network provides smoother targets. The actor network calculates action distributions aiding in exploration in continuous action spaces. For large-scale implementations, tensor-based approaches are superior in performance.
#MQL5 #MT5 #ReinforcementLearning #AlgoTrading
Read more...
β€15π10π¨βπ»4π2π1
Dive into the intricacies of MetaTrader 5's new Free Robots, offering a comprehensive suite of 28 Expert Advisors (EAs) designed around candlestick patterns and supported by technical indicators like CCI, MFI, RSI, and Stochastic Oscillator. These EAs provide traders with a dynamic approach to identify potential market reversals through tested patterns such as BlackCrows WhiteSoldiers, BullishBearish Engulfing, and more. Learn how each EA integrates a systematic logic flow β from pattern detection to trade execution and closure based on indicator signals β enabling developers to enhance their algorithmic trading strategies with precision and efficiency.
#MQL5 #MT5 #EA #Trading
Read more...
#MQL5 #MT5 #EA #Trading
Read more...
π28β€15π¨βπ»5π2
Exploring the intricacies of variables and functions, the article delves into how static variables help avoid unnecessary global variables, highlighting the role of functions as special types of variables that can return data types, unlike procedures. It explains the nuances of handling functions as constant variables across different programming languagesβJavaScript, Python, C, C++, and MQL5. The text further clarifies the distinction and application of predefined variables in MQL5, which, while appearing as constants, can be modifiable under specific conditions using certain functions. This approach enhances code readability, maintainability, and security, crucial for developers working with algorithmic trading.
#MQL5 #MT5 #programming #variables
Read more...
#MQL5 #MT5 #programming #variables
Read more...
π28β€22π¨βπ»11
A script has been developed to output a CSV file containing all Signal properties from the MQL4 Trade Signals functionality. This tool allows users to organize and analyze signals by their preferred metrics using spreadsheet software, such as Excel. Note that it only applies to MT4 signals and is limited to 1000 entries. To ensure accurate data extraction, make sure to activate the "Signals" tab in MetaTrader, so the platform downloads the necessary data.
The CSV will be stored in the terminal's "MQL4\Files" directory. Navigate to this folder through MetaTrader by selecting File, then Open Data Folder, and proceed to "MQL4\Files". Additionally, the source code for all CodeBase publications is accessible in MetaEditor's "Public Projects" section under "FMIC".
#MQL4 #MT4 #script #CSV
Read more...
The CSV will be stored in the terminal's "MQL4\Files" directory. Navigate to this folder through MetaTrader by selecting File, then Open Data Folder, and proceed to "MQL4\Files". Additionally, the source code for all CodeBase publications is accessible in MetaEditor's "Public Projects" section under "FMIC".
#MQL4 #MT4 #script #CSV
Read more...
π27β€3π¨βπ»1
Analyzing asynchronous operations in MetaTrader 5 reveals why templates close charts prematurely. Applying a template triggers a Deinit event due to the control indicator being removed from the chart. The template processing asynchronously ensures performance, but creates challenges for programmers unfamiliar with execution sequences.
Recent updates to the replay/simulation service involve crucial changes in the control and mouse modules. Modifications include new blocking mechanisms and improved object handling within different subwindows. A key aspect is handling synchronous vs. asynchronous operations efficiently to avoid execution errors and maintain chart stability. Adjustments like the addition of unique naming conventions for objects and new variables enhance flexibility and prevent conflicts.
#MQL5 #MT5 #MetaTrader #Algorithm
Read more...
Recent updates to the replay/simulation service involve crucial changes in the control and mouse modules. Modifications include new blocking mechanisms and improved object handling within different subwindows. A key aspect is handling synchronous vs. asynchronous operations efficiently to avoid execution errors and maintain chart stability. Adjustments like the addition of unique naming conventions for objects and new variables enhance flexibility and prevent conflicts.
#MQL5 #MT5 #MetaTrader #Algorithm
Read more...
π24β€8π¨βπ»1
Modularizing code enhances maintainability and development efficiency, especially for an Admin Panel in MQL5. This approach breaks monolithic code into independent reusable components like Authentication.mqh for security and AdminHomeDialog.mqh for the interface. Each module is encapsulated with specific functionality, reducing complexities in the main codebase.
The modular system allows seamless integration and updates of individual components without affecting the overall structure. Custom classes define key functionalities, ensuring scalability and collaboration across projects. Authentication and two-factor verification are managed for secure access, while the Admin Panel's modular nature simplifies future enhancements.
This strategy enhances readability, avoids errors, and facilitates collaborative development, crucial for efficient proje...
#MQL5 #MT5 #AdminPanel #Modularization
Read more...
The modular system allows seamless integration and updates of individual components without affecting the overall structure. Custom classes define key functionalities, ensuring scalability and collaboration across projects. Authentication and two-factor verification are managed for secure access, while the Admin Panel's modular nature simplifies future enhancements.
This strategy enhances readability, avoids errors, and facilitates collaborative development, crucial for efficient proje...
#MQL5 #MT5 #AdminPanel #Modularization
Read more...
π34β€10π¨βπ»4
Introducing BB-Xtreme EA, a sophisticated tool engineered for Bollinger Bands breakout strategies. It incorporates dynamic risk management features critical for effective trading.
Traders can tailor their initial lot size to match their account capabilities, ensuring adaptability. Stop loss and take profit are set in pips, offering traders control to safeguard gains and mitigate potential losses. Slippage control is essential for accurate order execution, especially in volatile markets. The EA includes an on/off switch for manual control over trading operations.
With customizable Bollinger Bands settings, traders can refine their breakout strategies. Capital protection is paramount; thus, a maximum drawdown limit feature is integrated to halt trading when thresholds are reached, preserving investment security. This comprehensive EA delivers a robust fou...
#MQL4 #MT4 #EA #AlgoTrading
Read more...
Traders can tailor their initial lot size to match their account capabilities, ensuring adaptability. Stop loss and take profit are set in pips, offering traders control to safeguard gains and mitigate potential losses. Slippage control is essential for accurate order execution, especially in volatile markets. The EA includes an on/off switch for manual control over trading operations.
With customizable Bollinger Bands settings, traders can refine their breakout strategies. Capital protection is paramount; thus, a maximum drawdown limit feature is integrated to halt trading when thresholds are reached, preserving investment security. This comprehensive EA delivers a robust fou...
#MQL4 #MT4 #EA #AlgoTrading
Read more...
π30β€17π€3π¨βπ»3β‘1