Explore how transforming multi-state trading strategies into simpler, two-state systems can enhance algorithmic trading evaluations. Learn how to define reducibility criteria and compare transformed systems against the original. The method involves calculating the probability and average time until crossing predefined corridor boundaries. This transformation leverages the power of fractal formulas, enabling the practical breakdown of complex strategies into manageable elements. Such approaches aid in constructing more robust trading systems by evaluating different strategy behaviors over time. This detailed methodology, supported by a strategy generator, offers valuable insights for traders and MetaTrader 5 developers seeking to optimize trading processes.
π Read | AppStore | @mql5dev
#MQL5 #MT5 #Strategy
π Read | AppStore | @mql5dev
#MQL5 #MT5 #Strategy
β€48π10β‘4π¨βπ»4π2π2π2
The MACD Histogram functions as the bar chart component of the MACD indicator. It calculates the difference between the MACD line and the Signal line to measure trend momentum, whether accelerating or decelerating. As bars lengthen above the zero line, buying momentum strengthens, whereas lengthening bars below indicate strengthening selling momentum. Shortening bars generally signify weakening momentum, suggesting potential trend reversals or consolidations. Bars crossing the zero line mark the crossover point between the MACD and Signal lines. While a strong signal filter, the MACD Histogram should be complemented with other indicators and thorough trend analysis for comprehensive insights.
π Read | Freelance | @mql5dev
#MQL5 #MT5 #Indicator
π Read | Freelance | @mql5dev
#MQL5 #MT5 #Indicator
β€36π8π3π¨βπ»2
Improving library classes and integrating event handling for graphical objects can enhance responsiveness in trading platforms. Developers often face challenges when programmatically defining graphical object properties. Tracking changes in objects, such as when a line is crossed, adds computational overhead. The OnChartEvent() function can efficiently signal these changes, minimizing resource-intensive polling.
This functionality is being expanded to include the creation, property modification, renaming, and removal of graphical objects. By extending the current library class toolkit, developers can programmatically identify and respond to changes in specific properties, ensuring precise and efficient event handling without unnecessary overhead.
Enhancing event control involves adding new identifiers and message indices. This ensures events like g...
π Read | Quotes | @mql5dev
#MQL5 #MT5 #Algorithm
This functionality is being expanded to include the creation, property modification, renaming, and removal of graphical objects. By extending the current library class toolkit, developers can programmatically identify and respond to changes in specific properties, ensuring precise and efficient event handling without unnecessary overhead.
Enhancing event control involves adding new identifiers and message indices. This ensures events like g...
π Read | Quotes | @mql5dev
#MQL5 #MT5 #Algorithm
β€64π15π¨βπ»8π4β3π2
A universal class library is now available for implementing diverse StopLoss trailing strategies in trading robots. This library enables flexible management of StopLoss for open positions based on a fixed distance from the price or using popular indicators like Parabolic SAR, AMA, DEMA, FRAMA, MA, TEMA, VIDYA, and even custom levels.
The solution is integrated into MQL5 Expert Advisors by connecting the required class, setting parameters, and executing the Run() method in OnTick(). Classes include CSimpleTrailing for price-based trailing and CTrailingByInd for indicator-based trailing, with further subclasses like CTrailingBySAR and CTrailingByAMA for specific strategies.
Key parameters include SetSymbol, SetMagicNumber, SetStopLossOffset, SetTrailingStart, SetTrailingStep, SetSpreadMultiplier, and SetActive. Indicator classes have additional parameter...
π Read | Forum | @mql5dev
#MQL5 #MT5 #Trading
The solution is integrated into MQL5 Expert Advisors by connecting the required class, setting parameters, and executing the Run() method in OnTick(). Classes include CSimpleTrailing for price-based trailing and CTrailingByInd for indicator-based trailing, with further subclasses like CTrailingBySAR and CTrailingByAMA for specific strategies.
Key parameters include SetSymbol, SetMagicNumber, SetStopLossOffset, SetTrailingStart, SetTrailingStep, SetSpreadMultiplier, and SetActive. Indicator classes have additional parameter...
π Read | Forum | @mql5dev
#MQL5 #MT5 #Trading
β€47π¨βπ»5π€―3π2
A new function is available to convert server times between broker time zones, specifically for stored times of bars, ticks, or economic calendar events. Identifying DST schedules for source and destination servers, whether US, EU, or none, is facilitated using an online script. The function incorporates standard offset notation, like JavaScript, where positive time zones have positive offsets (GMT+3 as +10800) and negative time zones have negative offsets. This contrasts with MQL5βs TimeGMTOffset(), which inverses this relationship. For a thorough understanding and extended functionality, the complete library is accessible online. It comes with additional features for enhanced time zone management.
π Read | AppStore | @mql5dev
#MQL5 #MT5 #script
π Read | AppStore | @mql5dev
#MQL5 #MT5 #script
β€28π¨βπ»5π―2π1π1
Support and resistance zones are crucial concepts in technical analysis, serving as key psychological barriers for traders. Understanding these levels is essential as they significantly influence market participants' decisions. Support zones indicate areas where buying pressure exceeds selling pressure, causing price rebounds. Conversely, resistance zones denote levels where selling pressure halts upward movement.
The focus here is to automate the identification of these zones using an EA. By analyzing recent price data, the EA can spot swing highs and lows, pivotal for defining these zones. A swing low is characterized by a candle with a low price lower than its preceding and succeeding candles, while a swing high has a higher price.
For support zones, the EA logs relevant data, such as swing low time and price, ensuring no candle breaks below this zone t...
π Read | CodeBase | @mql5dev
#MQL5 #MT5 #Trading
The focus here is to automate the identification of these zones using an EA. By analyzing recent price data, the EA can spot swing highs and lows, pivotal for defining these zones. A swing low is characterized by a candle with a low price lower than its preceding and succeeding candles, while a swing high has a higher price.
For support zones, the EA logs relevant data, such as swing low time and price, ensuring no candle breaks below this zone t...
π Read | CodeBase | @mql5dev
#MQL5 #MT5 #Trading
β€35π10π¨βπ»2π1
Explore the latest advancements in building a robust statistical arbitrage framework tailored for MetaTrader 5 traders. The initial setup includes Python classes for cointegration tests and a comprehensive database to facilitate real-time strategy updates. A key focus is a scoring system that critically evaluates liquidity, transaction costs, and stability of portfolio weights to ensure efficiency. Additionally, strategic criteria like data frequency and lookback period can greatly impact trading outcomes. This detailed approach not only enhances the reliability of trading systems but also bridges the gap between theoretical concepts and practical, testable algorithmic trading strategies.
π Read | VPS | @mql5dev
#MQL5 #MT5 #Algorithm
π Read | VPS | @mql5dev
#MQL5 #MT5 #Algorithm
β€27π2π2π1π¨βπ»1
The article focuses on the All Sessions EA, a MetaTrader 5 tool designed to enhance understanding of global forex market sessions by visualizing them directly on trading charts. The EA aligns with broker server time, automatically drawing session boxes for Asia, Tokyo, London, and New York, providing clear differentiation without time zone confusion. It includes user-friendly features like on-chart toggles and real-time alerts for breakout events, aiding traders in assessing volatility shifts. The modular, event-driven design ensures efficient resource usage and intuitive interaction, offering both beginner and experienced traders a detailed, real-time map of trading activity worldwide.
π Read | NeuroBook | @mql5dev
#MQL5 #MT5 #Forex
π Read | NeuroBook | @mql5dev
#MQL5 #MT5 #Forex
β€52π5π¨βπ»3
The Bollinger Bands Squeeze is a significant technical signal indicating potential changes in market volatility. Bollinger Bands consist of a middle band (20-period Simple Moving Average) and upper and lower bands calculated as the middle band plus or minus two standard deviations. The squeeze phenomenon occurs when the bands narrow significantly, suggesting an impending volatility shift.
During a squeeze, the market enters a consolidation phase, with low price fluctuations as buying and selling pressure balance. This scenario is a precursor to a breakout with substantial price movement, though the directionβupward or downwardβremains uncertain.
Signs of an impending breakout include increased trading volume and other technical indicators like candlestick patterns and RSI. Thus, recognizing a Bollinger Bands Squeeze allows traders to anticipate...
π Read | AlgoBook | @mql5dev
#MQL5 #MT5 #BollingerBands
During a squeeze, the market enters a consolidation phase, with low price fluctuations as buying and selling pressure balance. This scenario is a precursor to a breakout with substantial price movement, though the directionβupward or downwardβremains uncertain.
Signs of an impending breakout include increased trading volume and other technical indicators like candlestick patterns and RSI. Thus, recognizing a Bollinger Bands Squeeze allows traders to anticipate...
π Read | AlgoBook | @mql5dev
#MQL5 #MT5 #BollingerBands
β€42π¨βπ»2
The ExpWPRBB Expert Advisor employs a straightforward trading approach utilizing Williams' Percent Range (WPR) and Bollinger Bands (BB). Positions are initiated when both indicators align: for a Buy, WPR exits the oversold territory, and the bar opens below the average BB line. For a Sell, WPR leaves the overbought zone, and the bar opens above the average BB line. Bollinger Bands breadth and ATR values determine Stop Loss and Take Profit levels. Functionality is exclusive to hedging accounts. An optional non-trading mode is available for signal visual testing.
Core input parameters include WPR and Bollinger Bands periods, deviation, shift, and price type. Trading parameters comprise signal-only mode, position volume, slippage tolerance, and a unique Magic number for tracking. Stop Loss and Take Profit can be predefined or dynamically computed using Bollinge...
π Read | Docs | @mql5dev
#MQL5 #MT5 #EA
Core input parameters include WPR and Bollinger Bands periods, deviation, shift, and price type. Trading parameters comprise signal-only mode, position volume, slippage tolerance, and a unique Magic number for tracking. Stop Loss and Take Profit can be predefined or dynamically computed using Bollinge...
π Read | Docs | @mql5dev
#MQL5 #MT5 #EA
β€29β‘3π3π¨βπ»3π3β2π₯2
Explore the power of Moving Averages in algorithmic trading with an informative guide on system design using MQL5 for MetaTrader 5. Discover three effective strategies: one, two, and three Moving Averages crossovers, each with distinct advantages in trend analysis. Learn to minimize whipsaws and optimize trading decisions by implementing these strategies systematically. This article provides clear coding examples and detailed steps for integrating Moving Averages into your trading setup, enhancing decision-making accuracy. Perfect for both seasoned developers and traders new to algorithmic solutions, this educational piece emphasizes practical application while keeping complex concepts accessible.
π Read | Calendar | @mql5dev
#MQL5 #MT5 #Trading
π Read | Calendar | @mql5dev
#MQL5 #MT5 #Trading
β€47π5π5π¨βπ»3π1
ExpPinBar Expert Advisor leverages a strategy centered around the Price Action PinBar indicator to initiate trades based on indicator signals. The tool features advanced trailing functionalities accessible through the trailing library, incorporating mechanisms like classic trailing, Parabolic SAR, and various moving averages such as AMA, DEMA, FRAMA, MA, TEMA, and VIDYA. It also considers High and Low candlestick shadow levels. Critical settings for the PinBar include defining minimum and maximum candle sizes and the position of the body relative to the preceding candle.
To optimize signals, users can adjust parameters like the aspect ratio of shadows. The configuration options for the advisor cover essentials such as position volume, slippage, magic numbers, and dynamic stop loss and take profit points based on PinBar shadows. Trailing settings allow cust...
π Read | Calendar | @mql5dev
#MQL5 #MT5 #EA
To optimize signals, users can adjust parameters like the aspect ratio of shadows. The configuration options for the advisor cover essentials such as position volume, slippage, magic numbers, and dynamic stop loss and take profit points based on PinBar shadows. Trailing settings allow cust...
π Read | Calendar | @mql5dev
#MQL5 #MT5 #EA
β€27π5π¨βπ»2π1
Explore efficient trade management with the AutoProtect Expert Advisor. This advanced solution automates crucial aspects like moving stop-losses to break-even, trailing stops as positions gain, and partial profit-taking. Built in the MQL5 environment, it provides flexibility for traders to customize individual functions according to their strategy. AutoProtect uniquely manages trades per symbol and supports filtering by magic number, allowing precise control. It enhances trading efficiency by focusing on real-time market dynamics, eliminating risks of manual errors. The structured, modular code supports easy updates, ensuring consistent and reliable trade adjustments. Ideal for both seasoned and aspiring MetaTrader 5 developers, AutoProtect optimizes trade management seamlessly.
π Read | Quotes | @mql5dev
#MQL5 #MT5 #EA
π Read | Quotes | @mql5dev
#MQL5 #MT5 #EA
β€33π5π¨βπ»3β1π1
In Part 37 of our series on MetaQuotes Language 5 (MQL5), we delve into developing a Regular RSI Divergence Convergence System with visual indicators. This system identifies bullish and bearish divergences between price swings and RSI values, automating trades with optional risk controls. The strategy detects potential trend reversals by spotting discrepancies between price action and RSI, using confirmed swing points and allowing for a clean divergence through tolerance buffers. We explore efficient MQL5 implementation, providing visual aids like colored lines for enhanced monitoring. This system empowers traders to capitalize on reversal setups with precise risk and reward management. Practical applications for algorithmic trading are highlighted.
π Read | Docs | @mql5dev
#MQL5 #MT5 #Strategy
π Read | Docs | @mql5dev
#MQL5 #MT5 #Strategy
β€38π4π2π¨βπ»2
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
π 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
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
π 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
π 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
π 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
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