A script has been developed to enhance chart analysis by creating a dynamic text object. This text not only rotates but also adjusts its position according to price levels. It changes color and content in real-time based on its location, providing a visually engaging and informative element to the chart. Such functionality can be especially advantageous for traders seeking to add annotations or dynamic markers to their trading charts, enhancing the situational awareness and decision-making processes. This tool seamlessly integrates with chart environments, aiding in the visualization of important market data.
#MQL4 #MT4 #script #Indicator
Read more...
#MQL4 #MT4 #script #Indicator
Read more...
π17β€5π2π¨βπ»2
The PrevDayLines.mq4 script is designed for MetaTrader 4, automatically plotting three essential price levels from the previous trading day on your chart. These levels include the highest price (Max), the lowest price (Min), and the average price (Avg), offering a clear visual reference for key support and resistance areas.
The script is fully customizable, permitting adjustments to the color, thickness, and style of lines to match user preferences.
Key features include automatic drawing of these price levels, customizable visuals with parameters for color, width, and line style, and straightforward integration, allowing immediate display on any chart. This tool is beneficial for traders who use historical price levels to identify potential market turning points.
#MQL4 #MT4 #EA #script
Read more...
The script is fully customizable, permitting adjustments to the color, thickness, and style of lines to match user preferences.
Key features include automatic drawing of these price levels, customizable visuals with parameters for color, width, and line style, and straightforward integration, allowing immediate display on any chart. This tool is beneficial for traders who use historical price levels to identify potential market turning points.
#MQL4 #MT4 #EA #script
Read more...
π18β€14π3π¨βπ»1
The CDebugLogger class offers a comprehensive logging solution optimized for MQL4/5 environments. It serves as a vital tool for developers focused on precise application monitoring and debugging.
**Key Features:**
- **Multiple Log Levels:** Supports INFO, WARNING, ERROR, and DEBUG levels, enabling developers to filter messages by significance.
- **Timestamp Inclusion:** Customizable timestamps for logging, essential for time-sensitive issue tracking.
- **File Logging:** Includes robust options for file logging, allowing specification of log file paths and CSV format for easier analysis.
- **Contextual Information:** Allows inclusion of function signatures, file names, and line numbers in logs for precise issue pinpointing.
- **Silent Keywords:** Ability to silence logs containing specific keywords to avoid logging sensitive information.
- **Filter Keywords:** En...
#MQL5 #MT5 #MQL #EA
Read more...
**Key Features:**
- **Multiple Log Levels:** Supports INFO, WARNING, ERROR, and DEBUG levels, enabling developers to filter messages by significance.
- **Timestamp Inclusion:** Customizable timestamps for logging, essential for time-sensitive issue tracking.
- **File Logging:** Includes robust options for file logging, allowing specification of log file paths and CSV format for easier analysis.
- **Contextual Information:** Allows inclusion of function signatures, file names, and line numbers in logs for precise issue pinpointing.
- **Silent Keywords:** Ability to silence logs containing specific keywords to avoid logging sensitive information.
- **Filter Keywords:** En...
#MQL5 #MT5 #MQL #EA
Read more...
π28β€9π5π¨βπ»2
Discover a new chart type for MetaTrader 5βideal for swing, position, and portfolio trading! We're creating Mountain and Iceberg charts using simple MQL5 code. These charts enhance profit/loss visibility at a glance with different colors, making them user-friendly for long-term traders. Despite its simplicity, this coding approach is robust and integrates seamlessly with your favorite indicators and EAs. This introduction to custom charting in MetaTrader 5 highlights its flexibility and potential, proving that with a little creativity, this platform can offer far more than many realize. Dive in and elevate your trading analysis!
#MQL5 #MT5 #Indicator #MQL5
Read more...
#MQL5 #MT5 #Indicator #MQL5
Read more...
π39β€22β‘7π3β2π¨βπ»1
A new Expert Advisor (EA) aims to monitor support and resistance breaks on H4 and H1 timeframes. Users only need to configure their charts to the H1 timeframe and apply the EA. After configuration, provide your Meta Quote ID from your phone to MetaTrader on your PC. This setup enables receiving notifications on breakout events for H1, H4, and moving averages. The process is straightforward, ensuring you stay updated on critical market movements efficiently.
#MQL4 #MT4 #EA #Strategy
Read more...
#MQL4 #MT4 #EA #Strategy
Read more...
π19β€13β‘12π¨βπ»2
Improving library classes:
Add code in \MQL5\Include\DoEasy\Defines.mqh to include the new graphical element type. Create an enumeration for standard images like Info, Warning, Error icons. Define new integer properties increasing the total from 122 to 129. Include new string properties and criteria for sorting graphical elements.
Update \MQL5\Include\DoEasy\Data.mqh to add new message indices and corresponding text messages. Modify \MQL5\Include\DoEasy\Objects\Graph\GBaseObj.mqh to return new control descriptions via the TypeElementDescription() method.
The \MQL5\Include\DoEasy\Objects\Graph\GCnvElement.mqh file requires methods for writing pointers to base objects for ToolTip associations. Ensure element opacity and display flags can be overridden in inherited classes. Introduce SetOpacityDraw method for shadow objects.
In \MQL5\Include\DoEasy\Obje...
#MQL5 #MT5 #Tooltip #WinForms
Read more...
Add code in \MQL5\Include\DoEasy\Defines.mqh to include the new graphical element type. Create an enumeration for standard images like Info, Warning, Error icons. Define new integer properties increasing the total from 122 to 129. Include new string properties and criteria for sorting graphical elements.
Update \MQL5\Include\DoEasy\Data.mqh to add new message indices and corresponding text messages. Modify \MQL5\Include\DoEasy\Objects\Graph\GBaseObj.mqh to return new control descriptions via the TypeElementDescription() method.
The \MQL5\Include\DoEasy\Objects\Graph\GCnvElement.mqh file requires methods for writing pointers to base objects for ToolTip associations. Ensure element opacity and display flags can be overridden in inherited classes. Introduce SetOpacityDraw method for shadow objects.
In \MQL5\Include\DoEasy\Obje...
#MQL5 #MT5 #Tooltip #WinForms
Read more...
π42β€35π7π₯5π¨βπ»3
The Dual Profit Closer EA enhances trading strategies by managing and closing buy and sell orders based on defined profit thresholds.
**Features:**
**Separate Buy & Sell Order Management:** The EA tracks buy and sell orders individually, closing each at the user-specified profit level, allowing for precise control over trading strategies.
**Real-Time Profit Tracking:** Provides live updates of overall buy and sell profits directly on the chart, keeping traders informed without the need for reviewing multiple reports.
**Customizable Profit Thresholds:** Users can easily set and adjust profit levels for both types of orders, enabling automatic order closure at optimal gain points.
**Avoid Broker Manipulation:** Instantly closes deals when overall profit for either buy or sell orders reaches the threshold, bypassing the need to set take profit (TP) or stop ...
#MQL4 #MT4 #EA #Scalper
Read more...
**Features:**
**Separate Buy & Sell Order Management:** The EA tracks buy and sell orders individually, closing each at the user-specified profit level, allowing for precise control over trading strategies.
**Real-Time Profit Tracking:** Provides live updates of overall buy and sell profits directly on the chart, keeping traders informed without the need for reviewing multiple reports.
**Customizable Profit Thresholds:** Users can easily set and adjust profit levels for both types of orders, enabling automatic order closure at optimal gain points.
**Avoid Broker Manipulation:** Instantly closes deals when overall profit for either buy or sell orders reaches the threshold, bypassing the need to set take profit (TP) or stop ...
#MQL4 #MT4 #EA #Scalper
Read more...
π38β€18π4π¨βπ»3π2
A new user-centric dialog panel is now available, offering dynamic calculations and displaying the maximum lot size permissible on brokerage accounts across various order types: buy, sell, pending buy, and pending sell. This tool bases its calculations on the available margin, ensuring accuracy for numerous securities including forex pairs, commodities, cryptocurrencies, and indices. The intuitive design allows the dialog to be minimized or closed directly from the panel, enhancing user experience without compromising functionality. This enhancement aims to streamline trading operations and improve decision-making efficiency for professional traders and developers.
#MQL5 #MT5 #Algorithm #Indicator
Read more...
#MQL5 #MT5 #Algorithm #Indicator
Read more...
β€22π11π¨βπ»3π1π1
An in-depth analysis focuses on Deriv's Boom 1000 synthetic market. This market is marked by its volatile bull and bear candles, making it notoriously unpredictable. The method of sending limited tick data results in breached stop losses with guaranteed slippage, hence many consider buy opportunities in trading strategies given its dominant bullish movements.
Machine learning techniques were employed to model relations and predict price movements. 100,000 rows of M1 data with RSI indicator readings were collected. Exploratory data analysis revealed an 83% correlation between falling RSI readings and falling prices, but the RSI had a weak correlation of 0.016 with price levels. The dataset was split for training and validation.
Two neural network classifiers were used: one for predicting price changes and another for RSI changes. The RSI model achieved an ac...
#MQL5 #MT5 #Strategy #AI
Read more...
Machine learning techniques were employed to model relations and predict price movements. 100,000 rows of M1 data with RSI indicator readings were collected. Exploratory data analysis revealed an 83% correlation between falling RSI readings and falling prices, but the RSI had a weak correlation of 0.016 with price levels. The dataset was split for training and validation.
Two neural network classifiers were used: one for predicting price changes and another for RSI changes. The RSI model achieved an ac...
#MQL5 #MT5 #Strategy #AI
Read more...
π23β€15π7π¨βπ»2π1
Discover the intricacies of the Smart Money Optimal Control (SMOC) advisor, designed for advanced Forex trading. Leveraging stochastic modeling and control optimization, SMOC uses Model Predictive Control (MPC) to anticipate market moves. Key features include adaptive forecast horizons and lot sizes tailored to market volatility and drawdown, dynamic stop loss and take profit based on the Average True Range (ATR), and a blend of technical indicators like SMA, RSI, and ATR for trend and volatility analysis. While offering sophisticated risk management, SMOC also tackles computational demands and the risk of overfitting, making it a potent tool for traders.
#MQL5 #MT5 #Algorithm #EA
Read more...
#MQL5 #MT5 #Algorithm #EA
Read more...
π21β€16π2π¨βπ»2π€2π€―1
Algorithmic trading efficiency demands seamless communication between trading systems and human administrators. This article presents methods to enhance the Administrator Messaging Interface using MQL5, emphasizing quick messaging and responsive interfaces.
Define responsiveness within the MQL5 GUI, focusing on immediate feedback, smooth performance, dynamic updates, scalability, and error handling. These components are crucial for timely trading actions and an intuitive interface.
Quick messages facilitate standard responses, error notifications, and routine commands. Include buttons in the Admin Panel for predefined messages, reducing manual input and ensuring rapid, consistent communication.
Implement responsive control buttonsβminimize, maximize, and closeβusing the CButton class. Enhance flexibility through customizable quick messages, managing cha...
#MQL5 #MT5 #AlgoTrading #EA
Read more...
Define responsiveness within the MQL5 GUI, focusing on immediate feedback, smooth performance, dynamic updates, scalability, and error handling. These components are crucial for timely trading actions and an intuitive interface.
Quick messages facilitate standard responses, error notifications, and routine commands. Include buttons in the Admin Panel for predefined messages, reducing manual input and ensuring rapid, consistent communication.
Implement responsive control buttonsβminimize, maximize, and closeβusing the CButton class. Enhance flexibility through customizable quick messages, managing cha...
#MQL5 #MT5 #AlgoTrading #EA
Read more...
π36β€26π¨βπ»8β‘4π₯3π2π€£1
A new library for multicurrency Expert Advisors helps accurately determine new bar events across different instruments. In a multicurrency scenario, new bars form at varying times for each instrument. Since the EA operates on a single instrument's chart, it is crucial to identify whether a new bar has formed in the OnTick() event handler for other instruments. This library offers a solution by storing the time of the first tick for each required instrument at every tick. When a new bar starts, this time updates and remains constant until the next bar.
The library simplifies the process by managing the necessary variables for different instruments and time periods. Users only need to call `UpdateNewBar()` at the beginning of OnTick() and use `IsNewBar(symbol, timeframe)` to check for new bar events. The library must be included by adding `NewBarEvent.mqh`. ...
#MQL5 #MT5 #EA #Indicator
Read more...
The library simplifies the process by managing the necessary variables for different instruments and time periods. Users only need to call `UpdateNewBar()` at the beginning of OnTick() and use `IsNewBar(symbol, timeframe)` to check for new bar events. The library must be included by adding `NewBarEvent.mqh`. ...
#MQL5 #MT5 #EA #Indicator
Read more...
π18β€10π¨βπ»4π€‘2π1π1
MetaTrader 5 developers, elevate your trading strategies with a sophisticated trailing stop mechanism using the Parabolic SAR indicator. This method automates StopLoss adjustments, enhancing trade protections without premature exits. Learn how to integrate a specialized trailing function in MQL5, leveraging Parabolic SAR for automatic price adaptation. Delve into creating an Expert Advisor to handle StopLoss via precise criteria checks, maintaining StopLevel and FreezeLevel constraints. Utilize \CTrade\ class for streamlined trade functions, ensuring seamless StopLoss modifications. This approach not only shields gains but also optimizes position management in trending markets. Enhance your algorithmic trading efficiency with these advanced techniques!
#MQL5 #MT5 #EA #Indicator
Read more...
#MQL5 #MT5 #EA #Indicator
Read more...
π30β€14π4π2π¨βπ»2
The Patch Time Series Transformer (PatchTST) offers an innovative method for time series forecasting. By segmenting time series into patches, it leverages Transformer architecture to capture complex semantic relationships between data points more effectively than traditional point-level analysis. The approach reduces computational complexity, enhances learning from extended data windows, and improves representation learning. PatchTST treats multivariate time series as independent univariate sequences, optimizing analysis while maintaining efficiency. The article also discusses practical implementation in MQL5, emphasizing efficient data preparation through OpenCL for improved algorithm performance. PatchTST showcases its potential in anomaly detection, classification, and long-term forecasting, making it a robust solution for advanced time series a...
#MQL5 #MT5 #AITrading #DeepLearning
Read more...
#MQL5 #MT5 #AITrading #DeepLearning
Read more...
π41β€31π4π¨βπ»4π2
The ATR Bands by AlexanderTeaH, originally from TradingView, have been successfully translated to MQL4. In scenarios where the entry is not a reversal, the Average True Range (ATR) can effectively guide stop loss or exit points. This tool also serves well for trailing stops, similar to the chandelier exit strategy. The conversion ensures that MQL4 users can now apply ATR Bands in their trading strategies, enhancing risk management and exit planning. This integration aims to provide traders with more precise control over their trades, leveraging the versatility of ATR-based indicators.
#MQL4 #MT4 #ATR #Indicator
Read more...
#MQL4 #MT4 #ATR #Indicator
Read more...
π24β€8π5π¨βπ»1
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...
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...
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...
```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...
#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...
#MQL5 #MT5 #Indicator #Algorithm
Read more...
π16β€11π2π¨βπ»2