Using a refined trading strategy on MetaTrader 5, we can effectively reduce the frequency of being stopped out despite predicting market trends accurately. The core approach involves implementing a mean-reverting strategy combined with support and resistance levels. Rather than following conventional advice like widening stop lossesβwhich increases inconsistent risk exposureβwe maintain fixed stop loss sizes for clarity and consistency. By employing neural network predictions of moving averages to assess potential price movements, our strategy filters potential losses. This method embraces a data-driven, systematic approach over subjective judgment, enhancing profitability and risk management in algorithmic trading.
π Read | Quotes | Share!
#MQL5 #MT5 #Trading
π Read | Quotes | Share!
#MQL5 #MT5 #Trading
π22β€9π₯5β2π¨βπ»2π1
Transformer-based architectures are revolutionizing multimodal time series forecasting with their ability to handle channel independence and channel mixing. The fusion of these approaches allows models to suppress noise and mitigate distribution drift while capturing high information capacity and channel specificity. The InjectTST method stands out by injecting global information into independent channels without explicit dependency modeling. This approach enhances forecasting accuracy by balancing noise suppression with channel-specific insights, utilizing a hybrid strategy of channel independence and mixing. Through advanced parallel processing and Transformer encoder use, InjectTST offers a robust solution for time series analysis, promising enhanced performance for traders and developers alike.
π Read | AlgoBook | Share!
#MQL5 #MT5 #Algorithm
π Read | AlgoBook | Share!
#MQL5 #MT5 #Algorithm
π22β€4π₯4β‘2π2π¨βπ»1
In Part 8 of our series, attention shifts to the Butterfly harmonic pattern in MetaQuotes Language 5 (MQL5). This reversal setup uses Fibonacci ratios to identify market turning points, providing clear entry and exit signals. Developing an Expert Advisor (EA) that automates the detection and execution of these trades can enhance strategy effectiveness.
The Butterfly pattern consists of five key points: X, A, B, C, and D, forming specific bearish and bullish sequences. The EA identifies these patterns by calculating pivot points and employing Fibonacci retracements for precision.
Implementation involves setting global variables, leveraging the "Trade\Trade.mqh" library, and defining structures for trading execution. Visualization functions enhance pattern recognition on charts. OnTick event handling ensures efficient analysis of real-time data witho...
π Read | CodeBase | Share!
#MQL5 #MT5 #Strategy
The Butterfly pattern consists of five key points: X, A, B, C, and D, forming specific bearish and bullish sequences. The EA identifies these patterns by calculating pivot points and employing Fibonacci retracements for precision.
Implementation involves setting global variables, leveraging the "Trade\Trade.mqh" library, and defining structures for trading execution. Visualization functions enhance pattern recognition on charts. OnTick event handling ensures efficient analysis of real-time data witho...
π Read | CodeBase | Share!
#MQL5 #MT5 #Strategy
π27β€9π¨βπ»3π2β‘1π1π1
Reinforcement learning (RL) enhances the capability of traditional machine learning by effectively managing complex models when historical data is limited. Neural networks, while powerful, face challenges like overfitting and poor generalization. RL offers a solution through techniques like Prioritized Experience Replay (PER), which focuses on high-priority samples, improving efficiency, and learning speed. Key RL components include designing effective reward functions and selecting suitable algorithms, balancing between value-based and policy-based methods, like Q-Learning or PPO. Implementing PER requires additional complexity but provides more targeted learning. Both Proportional and Rank-based Prioritization each have specific advantages and challenges, affecting sampling distribution and stability.
π Read | AppStore | Share!
#MQL5 #MT5 #RL
π Read | AppStore | Share!
#MQL5 #MT5 #RL
π30β12β€9π1π¨βπ»1
This script efficiently gathers closing prices, attaching them to respective dates and times, and subsequently stores the information in a CSV file within the MQL5/Files directory. This approach allows easy external access for further analysis. The script utilizes fundamental functions, leaving room for enhancements once familiarity with advanced functions like CopyTime or CopyRates is established. While these built-in functions might streamline data retrieval, the current script remains effective for basic data collection needs. The choice between iClose, iTime, and other functions can depend on the specific requirements of your project, as performance and complexity trade-offs need consideration.
π Read | Quotes | Share!
#MQL5 #MT5 #script
π Read | Quotes | Share!
#MQL5 #MT5 #script
π20β€8π4β2π¨βπ»2
In Part 19 of our series, we implemented significant code changes to enable a new order system in MetaTrader 5. This initiative aims to provide traders with visual and easily understandable order placement, negating the need for detailed knowledge of tick values and such particulars.
Planning involved designing custom indicators with MetaTrader 5's resources, demanding a robust understanding of MQL5. Our goal is to create objects that communicate seamlessly and integrate effectively with each order system.
The implementation phase includes developing several classes such as C_Object_Base, C_Object_BackGround, and C_Object_TradeLine, each handling specific functions to maintain system integrity. Initial coding focuses on structuring these classes to meet the complex demands of the new order system.
Moving forward, modification of the C_ObjectsTr...
π Read | AppStore | Share!
#MQL5 #MT5 #ExpertAdvisor
Planning involved designing custom indicators with MetaTrader 5's resources, demanding a robust understanding of MQL5. Our goal is to create objects that communicate seamlessly and integrate effectively with each order system.
The implementation phase includes developing several classes such as C_Object_Base, C_Object_BackGround, and C_Object_TradeLine, each handling specific functions to maintain system integrity. Initial coding focuses on structuring these classes to meet the complex demands of the new order system.
Moving forward, modification of the C_ObjectsTr...
π Read | AppStore | Share!
#MQL5 #MT5 #ExpertAdvisor
π57β€21πΎ9π€―3π3π¨βπ»3
The Engulfing Pattern Plus One indicator focuses on a specific chart pattern where the current bar completely engulfs the two preceding bars. This observation is based on the 'High' and 'Low' price data. The pattern is visually represented using 'Arrow' objects to indicate occurrences on the chart. Additionally, two rectangles can be manually drawn for users to visualize the pattern and comprehend its formation more clearly. This enhanced visualization aids in technical analysis by showing how the pattern operates, allowing for more informed trading decisions. The Engulfing Pattern Plus One provides a precise view for those looking to analyze market movements and potential reversals.
π Read | Signals | Share!
#MQL5 #MT5 #Indicator
π Read | Signals | Share!
#MQL5 #MT5 #Indicator
β€70π39π₯9β8π¨βπ»7π2
The process exports a trading account's transaction history to a file within your terminal directory at MQL4/Files or to a shared location at Common/Files. The file name can be autonomously created or specified via script parameters. This file assists in replicating transactions on a different server with the Simple History Receiver Expert Advisor or its open-source variant.
Parameters include:
- File Name: Determine a specific name or allow automatic generation.
- Data Separators: Choose between commas or semicolons for CSV data separation and decide on a dot or comma for the decimal point.
- Common Folder Storage: Set to True to save the file in the Common/Files folder instead of the local MQL4/Files folder.
Understanding and setting these parameters correctly streamlines data management and enhances efficiency in transaction simulations.
π Read | Freelance | Share!
#MQL4 #MT4 #Script
Parameters include:
- File Name: Determine a specific name or allow automatic generation.
- Data Separators: Choose between commas or semicolons for CSV data separation and decide on a dot or comma for the decimal point.
- Common Folder Storage: Set to True to save the file in the Common/Files folder instead of the local MQL4/Files folder.
Understanding and setting these parameters correctly streamlines data management and enhances efficiency in transaction simulations.
π Read | Freelance | Share!
#MQL4 #MT4 #Script
π28β€12π3π¨βπ»3
Explore the fascinating Anarchic Society Optimization (ASO) algorithm, inspired by anarchic societal structures without hierarchy. ASO applies unique optimization strategies, diverging from traditional swarm intelligence techniques like PSO and ACO. It balances various movement strategies, guided by indices like Fickleness, External, and Internal Irregularity, to enhance solution space exploration and avoid local optima. With adaptive parameters mimicking anarchic behavior, ASO offers MetaTrader 5 developers and algorithmic traders a robust tool for complex optimization tasks across both continuous and discrete problems, enhancing decision-making through innovative, autonomous procedural design.
π Read | Calendar | Share!
#MQL5 #MT5 #Algorithm
π Read | Calendar | Share!
#MQL5 #MT5 #Algorithm
π17β€15π¨βπ»2π1
The Engulfing Pattern Plus One indicator focuses on a specific chart pattern where the current bar completely engulfs the two preceding bars. This observation is based on the 'High' and 'Low' price data. The pattern is visually represented using 'Arrow' objects to indicate occurrences on the chart. Additionally, two rectangles can be manually drawn for users to visualize the pattern and comprehend its formation more clearly. This enhanced visualization aids in technical analysis by showing how the pattern operates, allowing for more informed trading decisions. The Engulfing Pattern Plus One provides a precise view for those looking to analyze market movements and potential reversals.
π Read | Docs | Share!
#MQL5 #MT5 #Indicator
π Read | Docs | Share!
#MQL5 #MT5 #Indicator
π36β€15β2π¨βπ»2π1
The latest advancements in developing a trading Expert Advisor involve crucial updates to the order system for accommodating both NETTING and HEDGING accounts, reflecting their operational differences. For NETTING, an average price is generated with a single open position, while HEDGING allows multiple positions with individual limits for simultaneous buying and selling.
The goal is to make the order system visual, eliminating message boxes for position analysis. This visual approach enables real-time insight into profit and loss limits of OCO positions without extra calculations. The strategy involves leveraging MQL5 to model data effectively, supporting dynamic objects and facilitating better chart management without restricting the number of objects.
π Read | CodeBase | Share!
#MQL5 #MT5 #AlgoTrading
The goal is to make the order system visual, eliminating message boxes for position analysis. This visual approach enables real-time insight into profit and loss limits of OCO positions without extra calculations. The strategy involves leveraging MQL5 to model data effectively, supporting dynamic objects and facilitating better chart management without restricting the number of objects.
π Read | CodeBase | Share!
#MQL5 #MT5 #AlgoTrading
β€36π28π₯2π¨βπ»2π1π1
An indicator named "CHO Smoothed Arrow" has been developed to display arrows in the main window when two lines, 'CHO' and 'Smoothed CHO', intersect. The second version of this indicator introduces enhanced signal checking criteria. In this version, a 'BUY' signal is considered valid only when it appears below the zero line, while a 'SELL' signal is valid only when it occurs above the zero line.
Given that this indicator functions as an oscillator, two strategies can be applied to enhance trading decisions. Firstly, it can be used in conjunction with an additional filter from a trend indicator to improve accuracy. Secondly, a trader might choose to increase their position with each signal generated by the indicator. This refined approach aims at maximizing efficiency and potential returns in trading activities.
π Read | Forum | Share!
#MQL5 #MT5 #Indicator
Given that this indicator functions as an oscillator, two strategies can be applied to enhance trading decisions. Firstly, it can be used in conjunction with an additional filter from a trend indicator to improve accuracy. Secondly, a trader might choose to increase their position with each signal generated by the indicator. This refined approach aims at maximizing efficiency and potential returns in trading activities.
π Read | Forum | Share!
#MQL5 #MT5 #Indicator
π43β€20π₯2π¨βπ»2β‘1π1
Unveil the intricacies of the Asian Breakout Strategy expertly coded into an MQL5 Expert Advisor. This robust system utilizes session-based range detection and moving average trend filtering. It strategically places pending orders at calculated breakout levels, ensuring optimal position entries. Built-in dynamic risk management, including stop-loss and take-profit settings, mitigates market unpredictability. Additionally, a time-based exit strategy ensures efficient order handling post-session. Successful backtesting showcases its effectiveness, which can be further enhanced with trailing stops. This comprehensive EA offers traders and developers a precise tool for trading breakouts, enriching both technical skills and algorithmic trading strategies.
π Read | Calendar | Share!
#MQL5 #MT5 #AlgoTrading
π Read | Calendar | Share!
#MQL5 #MT5 #AlgoTrading
β€14π13π1π1π¨βπ»1πΎ1
Our focus shifts to automating trade entries using MQL5 in the Economic Calendar series. Trades are automated by analyzing news events, user-defined filters, and time offsets. Orders are executed based on forecast and prior values, aligned with market expectations.
Critical trade logic components include time filters, currency significance, and impact assessments. Trades are evaluated using an offset period before the event. If forecast exceeds prior values, a BUY is executed; otherwise, a SELL. Absent or equal data results in no trade.
Countdown timers manage timing until news release, resetting post-trade to adjust to evolving conditions. Robust implementation ensures trades are executed accurately and strategically, enhancing automated trading precision.
π Read | Docs | Share!
#MQL5 #MT5 #AlgoTrading
Critical trade logic components include time filters, currency significance, and impact assessments. Trades are evaluated using an offset period before the event. If forecast exceeds prior values, a BUY is executed; otherwise, a SELL. Absent or equal data results in no trade.
Countdown timers manage timing until news release, resetting post-trade to adjust to evolving conditions. Robust implementation ensures trades are executed accurately and strategically, enhancing automated trading precision.
π Read | Docs | Share!
#MQL5 #MT5 #AlgoTrading
π23β€13β3π2π1π¨βπ»1
The Quarters Theory, developed by Ilian Yotov, segments significant price ranges into smaller segments for technical analysis. These segmentsβdefined by major whole numbers and subdivided into large and small quartersβoffer traders a structured way to identify support and resistance levels. Using MQL5, the "Quarters Drawer" script automates the visualization of these levels, simplifying identification of key market dynamics.
MQL5 implementation enables customization through input parameters, allowing traders to modify line styles, colors, and visibility of various quarters. The script's architecture adheres to strict coding standards, ensuring reliable performance. By marking major and intermediate levels on charts, it provides traders with a systematic framework to analyze price behavior, supporting efficient trading decisions.
π Read | Freelance | Share!
#MQL5 #MT5 #Strategy
MQL5 implementation enables customization through input parameters, allowing traders to modify line styles, colors, and visibility of various quarters. The script's architecture adheres to strict coding standards, ensuring reliable performance. By marking major and intermediate levels on charts, it provides traders with a systematic framework to analyze price behavior, supporting efficient trading decisions.
π Read | Freelance | Share!
#MQL5 #MT5 #Strategy
π22β€14β‘1π1π¨βπ»1
Understanding data types and operators is crucial for MQL5 development. In strongly-typed languages like MQL5, operations can yield different outcomes based on data types. For instance, dividing integers results in an integer, potentially causing confusion for newcomers. Typecasting remedies this by converting integers to floating-point values, ensuring expected results. Furthermore, programmers must grasp integer representation in memory. The concept of bit width explains range limitations for data types, impacting operations and potential errors. Logical operators, evaluating conditions, complement arithmetic operations, providing a framework for understanding computational logic within the programming environment. Exploring these topics helps avoid common pitfalls.
π Read | VPS | Share!
#MQL5 #MT5 #Education
π Read | VPS | Share!
#MQL5 #MT5 #Education
π39β€15β‘2π2π¨βπ»1
An EA has been developed to autonomously close BUY and SELL orders independently, using user-specified profit percentages tied to the account balance. This tool enables traders to establish distinct profit targets for both types of positions. By doing so, it manages each market side separately, concluding trades once their specific profit objectives are met. Furthermore, users can monitor individual BUY and SELL profits directly on the chart. This feature provides real-time visual feedback to effortlessly track trade performance, ensuring a more organized trading approach.
π Read | Forum | Share!
#MQL4 #MT4 #EA
π Read | Forum | Share!
#MQL4 #MT4 #EA
π31β€14β‘5π3π1π¨βπ»1
Gann's Square of 9 remains a standout in market analysis for its geometric and numerical approach, offering insights into price levels and time cycles. We've outlined how to translate this historic tool into the digital age with an indicator for MetaTrader 5. This involves coding sophisticated algorithms in MQL5 to represent Gann's spiraling number sequence as a visual trading tool. The indicator aids in determining key support and resistance levels and relevant time intervals using dynamic price and time scales. Additionally, this digital adaptation captures the modern acceleration of market cycles, thus serving both experienced traders and newcomers seeking to integrate advanced technical analysis into their strategies.
π Read | Docs | Share!
#MQL5 #MT5 #AlgoTrading
π Read | Docs | Share!
#MQL5 #MT5 #AlgoTrading
β€42π35π3π3π¨βπ»1
The ADXm (experiment) has been adapted for MetaTrader 4 following its initial setup in MetaTrader 5. Those interested in the details of its functionality and implementation should review the information provided in the MetaTrader 5 release. This adaptation aims to bring the features of the ADXm to MetaTrader 4, allowing users of this platform to leverage its capabilities. It is important for users to understand the background and application of this version to make effective use of it in their trading strategies. Reference to the original MetaTrader 5 information will provide valuable insights into utilizing this tool effectively.
π Read | Signals | Share!
#MQL4 #MT4 #ADXm
π Read | Signals | Share!
#MQL4 #MT4 #ADXm
π28β€9β2π¨βπ»2β‘1π1
Explore the Kalman filter's potential in algorithmic trading for forex markets. As a recursive estimator, it filters noise and predicts financial time series, aiding strategies like mean reversion. The article guides on implementing this filter in MetaTrader 5, comparing its effectiveness with moving averages. Through backtesting, it reveals how the Kalman filter and moving averages enhance mean-reversion strategies, offering unique insights for both traders and developers. Although not superior, the Kalman filter provides distinct filtering advantages, emphasizing its unique role in trading algorithm development. Delve into this advanced tool for refining trading strategies and boosting profitability.
π Read | Signals | Share!
#MQL5 #MT5 #AlgoTrading
π Read | Signals | Share!
#MQL5 #MT5 #AlgoTrading
π24β€11π2π¨βπ»1