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
The article delves into the complexities of financial machine learning, highlighting a critical challenge faced by algorithmic trading models: label concurrency. In financial time series, labels that overlap in time create dependencies that contradict the Independent and Identically Distributed (IID) assumption of most ML algorithms. This often leads to overfitted models with poor out-of-sample performance. The solution proposed involves sample weighting based on average uniqueness, quantifying the unique information each data point represents and adjusting weights accordingly. This adjustment aims to rectify model training by prioritizing unique data points. The discussion also introduces three methods to handle non-IID data, focusing on bagging techniques and specific measures to enhance model reliability in trading environments.

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #ML
❀64πŸ‘Œ8🀣6πŸ‘4🀑2πŸ‘¨β€πŸ’»1
The Average True Range (ATR) indicator, introduced by J. Welles Wilder in 1978, remains a crucial tool for analyzing market volatility. It calculates the largest True Ranges over a specified period and provides insights into price movements and trading opportunities. Wilder later introduced smoothing to calm the fluctuations, utilizing a simple moving average typically over a 14-period range.

For those interested in expanding their toolkit, various multi-timeframe indicators and other technical tools are available through CodeBase or the Marketplace. Searching for specific methodologies, such as Alligator, MACD, or Bollinger Bands, can enhance analytical capabilities. Consider leveraging adaptive moving averages or volume-weighted averages to improve predictive accuracy in trading strategies.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #ATR
❀37πŸ‘Œ3πŸ‘¨β€πŸ’»3⚑1πŸ‘1πŸ‘€1
Traditional trading strategies often overlook the changing dynamics of portfolio sensitivity, particularly Delta's acceleration with price fluctuations. The article advocates using Black-Scholes Greeksβ€”Gamma and Deltaβ€”for strategic risk management and optimization. Gamma, the rate of Delta's change, enables proactive adjustments rather than reactive hedging. The article walks through setting up MQL5 scripts utilizing statistical methods and mathematical functions to calculate key metrics. By capturing historical data and real-time sensitivities for the EU50 index, traders can make data-driven decisions with Gamma and Delta analysis. Through this framework, traders gain a clearer picture of risk exposure and market sensitivity, refining their strategic approach.

πŸ‘‰ Read | AppStore | @mql5dev

#MQL5 #MT5 #Gamma
❀52πŸ†8πŸ‘6πŸ‘Œ4πŸ’―1πŸ‘¨β€πŸ’»1
A code snippet is available for writing price values to a file, serving various practical scenarios in programming. This functionality is particularly beneficial for developing a local trade copier that utilizes a file-based transfer approach. Additionally, it provides a method for temporarily saving values, allowing them to be read in subsequent login sessions. Beyond these use cases, the code can also be used for logging custom data into a file for future reference. The ability to write data onto a file efficiently supports a range of applications, from transaction replication to persistent storage of temporary data. This approach is advised for operations requiring structured data archival and retrieval across sessions.

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL4 #MT4 #Script
❀20πŸ‘4✍1πŸ‘¨β€πŸ’»1
Discover how MetaTrader 5 communicates with external platforms through APIs and enhances trading automation by integrating with Telegram using the WebRequest() function in MQL5. Dive into practical applications where you learn to send, edit, and delete messages using Telegram's API. This involves understanding the crucial components like bot tokens, chat IDs, and message IDs, which facilitate secure and precise message handling. Gain insights into setting timeout parameters and formatting data for API requests, ensuring seamless interaction between your trading platform and messaging services. This exploration offers valuable skills for developers and traders looking to leverage automated, real-time communication within MetaTrader 5.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #API
❀24πŸ‘¨β€πŸ’»2
A new strategy to visualize wick regions on lower-timeframe charts has been initiated. The primary goal is to enhance the Market Periods Synchronizer, integrating a Wick Visualization Utility. This tool isolates the upper and lower wick regions of higher-timeframe candles, rendering them with semi-transparent rectangles for detailed analysis.

To implement this, several technical steps are crucial. Initialization involves setting up a mutable UI for real-time interactions using a CCanvas bitmap label. This ensures efficient use of screen real estate while maintaining per-chart isolation through specific naming conventions.

The core logic focuses on rendering wicks only when a toggle is active. This involves calculating the top and bottom of candle bodies, and highlighting their wicks distinctly above and below these thresholds. These regions are prog...

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #Trading
❀42⚑5πŸ‘¨β€πŸ’»1πŸ‘€1
Financial markets present complex challenges due to their volatile nature, demanding sophisticated decision-making processes. Traditional frameworks involve analysts, risk managers, and executives but often struggle with agility and efficiency due to human limitations and hierarchical structures. The advent of AI and automated systems provides a solution by enhancing decision accuracy and speed.

Modern AI research focuses on adaptive software that learns from historical data, recognizing patterns for informed decisions. An intriguing development is Natural Language Processing (NLP) integration, enabling thorough analysis of financial news and forecasts for improved predictions.

The FinCon framework exemplifies progress, simulating professional team workflows with adaptive, multi-agent systems for efficient financial operations and risk management. This innov...

πŸ‘‰ Read | Forum | @mql5dev

#MQL5 #MT5 #FinTech
❀46⚑5πŸ‘¨β€πŸ’»2✍1
WaveWeisBarForce is a technical indicator designed to analyze market volume dynamics using the Weis wave methodology. It tracks and accumulates volumes within a trend, resetting when a directional change occurs. The indicator measures intensity by comparing the current wave volume to the largest recent accumulation, offering a window into market behavior. Input parameters include Volume_type, which allows selection between tick and real volume sources, and Intensity for determining the reference bar window.

The indicator provides visual cues with Bullish Levels (1 to 4) in shades of green from light to LIME, and Bearish Levels (1 to 4) from light red to RED. WaveMax highlights the highest volume bar per wave, while WaveClimax indicates when current wave accumulation surpasses historical records. This indicator supports various assets and timeframes...

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #Indicator
❀40πŸ‘€4πŸ‘3πŸ‘¨β€πŸ’»3
Explore how fractals can redefine market analysis in algorithmic trading. By translating trading history and backtests into mathematical expressions, we can uncover new dimensions of strategy development. Learn to apply fractal models to both pricing and trading strategies, leveraging the Bernoulli scheme for probability evaluations with two-state or multi-state systems. This approach not only organizes trading data into actionable insights but also prepares us for complex model analysis. As developers, we gain the tools to convert diverse trading strategies into coherent, data-driven models, potentially enhancing predictive accuracy and trading efficiency in MetaTrader 5 environments.

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #DataAnalysis
❀45πŸ‘7πŸ‘¨β€πŸ’»5⚑2πŸ”₯2
Developers often need to manage time-specific logic for automated trading systems. This code base provides a straightforward solution to determine if the current time is within a defined time window. The utility requires two input parameters: start time and end time. Integration of this function allows electronic trading algorithms to execute trades only during specified time intervals, ensuring operations occur within designated periods. This implementation is crucial for strategies that rely on temporal conditions, supporting refined control over trading activities based on time-based criteria.

πŸ‘‰ Read | Signals | @mql5dev

#MQL4 #MT4 #Code
❀31πŸ”₯5πŸ‘¨β€πŸ’»3πŸ‘2πŸŽ‰2
No-code platforms like BotBrains offer accessible solutions for those interested in automated trading without programming expertise. Users can create complex trading robots by utilizing pre-built blocks that cover a range of functionalities, from simple moving average strategies to intricate spread trading techniques.

In BotBrains, trading robot development starts with defining constants and variables to track trading parameters and indicators. For instance, to implement a moving average strategy, users set up constants for slow and fast moving averages. Variables are then updated with real-time data, ensuring accurate crossover detection.

BotBrains enables integration with Telegram, facilitating real-time updates on trading activities. Debugging and interface creation are supported through a variety of blocks, allowing users to build, test, and ref...

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #Trading
❀77⚑9πŸ‘¨β€πŸ’»9πŸ‘8✍6πŸ‘€6πŸŽ‰2
A reliable signal indicator for MetaTrader 5 has been developed, integrating the RSI and a Moving Average (MA) to generate trend-following signals. Ideal for manual traders and suitable as a signal source in Expert Advisors (EA), it provides a non-repainting and clean visual representation.

The logic utilized ensures clarity:
- A Buy Signal is triggered with a Blue Arrow when the closing price exceeds the Moving Average, indicating an uptrend, and the RSI is above 50, confirming bullish momentum.
- Conversely, a Sell Signal appears with a Red Arrow when the closing price falls below the Moving Average, indicating a downtrend, and the RSI is under 50, confirming bearish momentum.

Features include clean, commented code and fully adjustable parameters for RSI and MA periods. Standard MT5 buffers are employed, compatible with iCustom() in EAs.

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #Indicator
❀51πŸ‘¨β€πŸ’»3⚑2πŸ‘€1
Explore the transformative power of the Multi-Timeframe Harmony Index (HI) for MetaTrader 5. By distilling multiple timeframe biases into a single, normalized value between -1.0 and +1.0, HI offers a streamlined decision-making tool with visual clarity through an integrated dashboard. Utilizing a three-bar structural logic and weighted formula, it presents traders with real-time alerts and chart signals, enhancing trading precision. HI's modular design supports both discretionary and algorithmic strategies, exporting data for broader integration across trading systems. User-defined weights and thresholds further tailor its application, making it an indispensable asset for both chart-based and automated trading.

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #Algorithm
❀46πŸ‘¨β€πŸ’»4
Explore the creation of an Expert Advisor in MetaTrader 5 using the CChartObjectStdDevChannel class for trading based on volatility channels. Discover the potential of MQL5’s Standard Library with its comprehensive documentation and object-oriented structure to transform manual chart analysis into automated algorithmic strategies. The post covers integrating MQL5 classes like CTrade for order management and discusses the strategy's practical setup, risk management, and testing. Gain insights into utilizing standard deviation for precise channel creation, enhancing both strategy visualizations and trade signal automation in trading environments. Ideal for developers seeking structured, professional-grade trading tools.

πŸ‘‰ Read | NeuroBook | @mql5dev

#MQL5 #MT5 #Trading
❀60πŸ‘9πŸ‘¨β€πŸ’»5πŸŽ‰1
Noise Elimination Technology (NET) has been incorporated into an RSI indicator, functioning similarly to a rolling Kendall rank correlation coefficient. This implementation aids in determining the trend direction of a simple moving average (SMA). It is important to note that NET's trend assessment differs from the SMA slope, leading to occasional discrepancies between the slope and trend color changes. Users should consider using the color change indicator as a signal for potential trend shifts. Prior experimentation with the NET period is recommended to optimize the indicator's effectiveness for trading decisions. Adjustments to the NET period may influence its responsiveness and accuracy.

πŸ‘‰ Read | Quotes | @mql5dev

#MQL5 #MT5 #Indicator
❀43πŸ‘¨β€πŸ’»1
The latest discussion focuses on improving the C_Orders class for handling market trades, specifically its capability to interpret messages from the Chart Trade indicator. For NETTING accounts, the existing code efficiently manages open and close positions, including reversals and partial closings. However, challenges arise with HEDGING accounts due to differences in position handling. When "CLOSE ALL POSITIONS" is pressed, the operation executed depends on the account type. A crucial adjustment in the code involves ensuring the proper closure of positions by confirming the match between the symbol in the Chart Trade message and the open position's symbol.

Additional care is required to manage trades involving historical assets. The retrieved ticket number is validated against a magic number to maintain distinct trading strategies within a single Expert Advis...

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL5 #MT5 #EA
❀34πŸ‘¨β€πŸ’»1
The application of machine learning to algorithmic trading presents unique challenges, especially within financial markets. Traditional supervised learning techniques fall short due to the fluid nature of market targets, unlike more defined domains like medicine. In trading, the target is not fixed, leading to methodological hurdles in model prediction. For instance, modeling financial returns or volatility presents diverse difficulties. This ambiguity in defining targets could hinder performance more than data or model weaknesses.

The inconsistency in target definition across various markets highlights the need for adaptable strategies. Performance ceilings in statistical models often result from methodological limitations. By redefining target variables, empirical model adjustments can enhance outcomes. Experimentation reveals that trading success hinges ...

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #ML
❀41πŸ‘Œ2πŸ‘¨β€πŸ’»2πŸ†1
Sequential bootstrapping is effective for sampling in financial ML, addressing concurrency at its source. Unlike traditional methods that allow redundancy, this method dynamically adjusts probabilities based on temporal overlaps, producing samples with maximally independent observations.

This method demonstrates inefficiencies of standard bootstrap in finance due to label concurrency. Standard bootstrap's reliance on IID observations does not translate well to financial data where observations overlap temporally. This results in a smaller effective sample size and misleading variance estimations.

Sequential bootstrapping adjusts the probability of drawing observations based on their uniqueness to the current sample, minimizing redundancy and enhancing model robustness. Implementing this requires efficient calculation of indicator matrices and uniq...

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #FinancialML
❀53πŸ‘8πŸ‘¨β€πŸ’»7
ZigZag NK Sound Alerts is designed to notify users with sound, push notifications, or popup alerts when there's a change in the ZigZag bar. This indicator employs three buffers: two dedicated to the ZigZag function itself and one for coloring. By utilizing this tool, users can efficiently monitor ZigZag bar changes without constantly checking their terminals. It's beneficial for those seeking automated notifications to streamline their workflow and enhance market analysis. Such indicators can be integral in maintaining attention to key market shifts while managing multiple tasks effectively.

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #Indicator
❀27πŸ‘5πŸ‘4πŸ‘¨β€πŸ’»2
The Circle Search Algorithm (CSA), an optimization technique, leverages the geometric properties of circles to balance exploitation and exploration. Its innovative approach, using tangents and angles, offers smooth search space exploration, particularly effective in high-dimensional spaces. CSA adapts agents' positions dynamically, improving convergence and solution quality. Despite some convergence issues, CSA's ability to handle complex problems remains noteworthy. Practical applications include aiding traders and developers in optimization scenarios. Changes to key parameters have enhanced predictability, making this algorithm beneficial for solving challenging optimization tasks in algorithmic trading and beyond.

πŸ‘‰ Read | VPS | @mql5dev

#MQL5 #MT5 #Algorithm
❀57🀣11πŸ‘¨β€πŸ’»6πŸ‘€4πŸ‘3✍1