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 described indicator operates by examining a series of Simple Moving Averages (SMA) across a specified range of periods at each bar to identify the most recent bounce, either upward or downward. This process involves checking all SMA periods from a defined minimum to maximum range. If no discernible bounce is detected, the bar remains unaltered.

The main function of this tool is to assess market momentum. When both upper and lower lines contain values, this suggests potential range-bound market conditions. However, the requirement for significant computational resources is a notable challenge. Utilizing an extensive range of MA periods or switching to more complex moving average methods could lead to delays in the indicator's loading time. Once initialized, only the latest bar needs updating. Efficient computation is crucial for optimal performance.

πŸ‘‰ Read | CodeBase | Share!

#MQL5 #MT5 #Algorithm
❀19πŸ‘11πŸ‘¨β€πŸ’»5πŸŽ‰2⚑1✍1πŸ‘Œ1
Programming optimization and clarity are priorities when defining variables and arrays in your EA. Begin by aligning initial variable names to those used in subsequent code lines. For instance, assign a specific variable, such as `g_rates`, to represent `MqlRates`, incorporating functionalities like open, close, high, and low of candles. Use a placeholder variable "i" for referencing specific candles, e.g., `CANDLECLOSE(3)` for candle 3's close price.

To fetch ASK and BID values, utilize `MqlTick` or `SymbolInfoDouble` for consistent results. Define arrays for moving averages, ATR, and other indicators while maintaining `AsSeries` for essential operations. Adjust #define statements according to your EA's requirements without affecting subsequent code.

Understanding candle features is crucial, particularly for price-action based EAs. Definitions include W...

πŸ‘‰ Read | AlgoBook | Share!

#MQL5 #MT5 #EA
πŸ‘25❀14πŸ€”1πŸ‘Œ1πŸ‘¨β€πŸ’»1
Algae, with their ancient origins and essential roles in ecosystems, inspire innovative mathematical models like the Artificial Algae Algorithm (AAA). Proposed in 2015, AAA models algae’s natural behaviors via three key processes: spiral movement, evolutionary process, and adaptation. Each algae colony serves as a candidate solution in optimization problems, with movement mimicking nutrient-seeking behavior. The evolutionary process fosters growth in suitable conditions, and adaptation allows suboptimal colonies to imitate successful ones. The algorithm's implementation involves initializing populations and key parameters, executing spiral movements, managing energy dynamics, and leveraging tournament selection for movement. This process results in a robust optimization framework based on biological dynamics.

πŸ‘‰ Read | CodeBase | Share!

#MQL5 #MT5 #Algorithm
πŸ‘18❀10🀨3πŸ‘Œ2πŸ‘¨β€πŸ’»2
Explore how to create a custom Heikin Ashi indicator in MQL5 that's both educational and practical for traders. Learn the method to calculate Heikin Ashi values, derive the HA Moving Average, and effectively integrate these into trading strategies using the iCustom() function. This includes defining entry conditions via Heikin Ashi and MA crossovers, and implementing risk management by dynamically setting stop-loss and take-profit levels with HA calculations. Such an approach also includes a trailing stop mechanism utilizing Heikin Ashi patterns to secure profits, offering clear insights into market movements, enhancing decision-making, and streamlining trading strategies.

πŸ‘‰ Read | AlgoBook | Share!

#MQL5 #MT5 #Indicator
πŸ‘41❀16πŸŽ‰2πŸ‘¨β€πŸ’»2πŸ‘Œ1
The MQL4 indicator offers two methods for calculating and displaying the Rate of Change (ROC). The first method is the Percentage-Based ROC, which measures price changes as a percentage of the closing price from n periods earlier. This approach is effective for identifying momentum shifts among various symbols. The second method is the ATR-Adjusted ROC, which introduces a normalization factor by dividing the ROC by the Average True Range (ATR) over a specified period. By accounting for volatility, this method facilitates better momentum comparisons across different assets. The indicator is valuable for traders seeking to visualize price momentum, both with and without volatility adjustments, offering versatility for multiple trading strategies. Available as a free, open-source tool.

πŸ‘‰ Read | AppStore | Share!

#MQL4 #MT4 #Indicator
πŸ‘23❀12πŸ”₯5πŸ‘¨β€πŸ’»2πŸ‘€2πŸ‘Œ1πŸ†1
The expert advisor (EA) aims to facilitate extensive market data gathering from a user's broker by leveraging tick data extraction. It systematically identifies market watch symbols, acquiring all available ticks or those up to a specified date. This functionality is vital for comprehensive backtesting or custom chart creation, with the caveat of adequate storage requirements given the data volume.

Structuring is handled by CDownloadManager, designed to manage download operations effectively. Key elements include tracking download states, symbol lists, and indexing current symbols under scrutiny. Efficient file operations are critical, entailing two primary functions for reading and writing strings in a binary format to manage symbol data seamlessly.

Initialization within the manager involves identifying active market watch symbols and populating them into ...

πŸ‘‰ Read | Calendar | Share!

#MQL5 #MT5 #EA
πŸ‘25❀11πŸ‘¨β€πŸ’»3πŸ‘Œ2
Selective trading systems leverage machine learning to improve precision and recall in time series classification for MetaTrader 5 developers. By employing a combination of two classifiers, the approach addresses challenges in model adaptability and error correction. The metamodel enhances recall by filtering false positives, thereby refining the precision of the base model's trade triggers. Iterative training and the creation of a "bad samples book" allow models to identify and exclude poor trading examples, steadily enhancing model accuracy. This method helps automate optimal trading times and reduces dependence on specific human-chosen features, offering a promising solution to the volatile nature of financial markets.

πŸ‘‰ Read | AlgoBook | Share!

#MQL5 #MT5 #Algorithm
πŸ‘38❀19πŸ‘¨β€πŸ’»5πŸ”₯4πŸ‘€4😁1πŸ‘Œ1
The ADXm indicator is well-known in the trading and coding community, and several versions of it exist within the code base. These include iterations such as the Smoothed ADXm, MTF VHF Adaptive ADXm, and others with similar adaptive capabilities. A common characteristic noted with ADXm is its tendency to become erratic during a ranging market.

Various smoothed versions have been developed to mitigate this issue. An innovative approach involves applying the ADXm calculation recursively to itself, rather than traditional smoothing methods. This unique approach appears effective, warranting its presentation in the current context.

Considerations for use include interpreting color changes for momentum or trend shifts and utilizing zero line crossings similarly. In the ADXm of ADXm mode, it is important to note that while slopes remain consistent, values...

πŸ‘‰ Read | VPS | Share!

#MQL5 #MT5 #Indicator
πŸ‘34❀16✍3πŸ‘Œ3😁2πŸ‘¨β€πŸ’»2
The Bull's Power indicator is a tool developed by Alexander Elder to measure market bullishness. This oscillator evaluates demand and supply forces by calculating the difference between the highest value over a period and the exponential moving average (EMA). When the Bull's Power value falls below zero, it suggests weakening bullish strength.

Understanding this indicator can be enhanced with strategies that provide actionable insights. One strategy involves identifying signals by comparing current and previous Bull's Power values. Another strategy focuses on strong movements or divergences by analyzing high values and Bull's Power efficacy. Automated systems can harness these strategies for more precise trading decisions.

πŸ‘‰ Read | Forum | Share!

#MQL5 #MT5 #Indicator
πŸ‘67❀30πŸ‘¨β€πŸ’»5✍3πŸ‘Œ3
Managing multiple strategies within a single account requires precision. Identifying individual strategy performance without magic numbers involves difficult tracking through comments or ticket ranges. Magic numbers offer a structured approach by tagging trades, assisting in quickly identifying strategy performance. This insight facilitates decisive actions such as suspending underperforming EAs or reallocating resources to successful strategies.

Having a unified view simplifies analysis and logging. With a panel aggregating closed profits, deal counts, and comments, it aids in record-keeping, strategy optimization, and client reporting.

For implementation, attach the Script/EA to any MT5 chart. Upon compilation, a table with magic numbers is generated. Consider chart size and font alignment for readability. Adjust the script timing for preferred update fr...

πŸ‘‰ Read | Forum | Share!

#MQL5 #MT5 #Strategy
πŸ‘26❀18πŸ€“11πŸ‘¨β€πŸ’»3⚑1πŸ‘Œ1
Bear's Power is a pivotal indicator designed by Dr. Alexander Elder, used to assess market bearishness. It operates as an oscillator around the zero line, highlighting bearish control. The calculation involves subtracting the exponential moving average from the low of a period. This indicator can offer valuable insights when paired with other trend indicators.

The Bear's Power strategy integrates various techniques, including the Bear's Power Movement, which signals market direction based on current versus previous values. Traders can gain from understanding the indicator through hands-on coding in MQL5, executed in the MetaTrader 5 terminal, to automate and test strategies efficiently. Reliable backtesting is recommended for effectiveness.

πŸ‘‰ Read | Freelance | Share!

#MQL5 #MT5 #Indicator
πŸ‘59❀28πŸ‘Œ4πŸ”₯3πŸ‘€2πŸ‘¨β€πŸ’»1
The 'PriceChannel_Signal_v2' custom indicator generates multiple signals for opening and closing positions without employing Stop Loss, Take Profit, or Trailing mechanisms. Two signals each are used for initiating both 'BUY' and 'SELL' positions, with one signal dedicated to closing each type. The EA is configurable for the specified working timeframe, with a single market entry allowed per bar.

Within its operational parameters, the mode settings distinguish between the current bar and new bar signal triggering. An advanced logging feature logs all operational details for comprehensive analysis. By altering 'Money Management' settings, the lot size can be fixed or adjusted to a dynamic percentage risk per trade. The 'Positions: Only one' flag ensures a single active position in the market, maintaining streamlined market engagement. Customization and ...

πŸ‘‰ Read | NeuroBook | Share!

#MQL5 #MT5 #Indicator
❀35πŸ‘24⚑3πŸ‘Œ2πŸ‘Ύ2πŸ‘¨β€πŸ’»1
Bill Williams’ fractal indicator is key for identifying reversal points. It utilizes a 5-bar pattern, with a bullish formation marked by the lowest low in the middle bar, and a bearish pattern featuring the highest high. Consecutive fractals in the same direction, either bullish or bearish, highlight market support or resistance levels, indicating potential upward or downward movements.

Pattern implementations in MQL5 cover a range from trend continuation to reversals, such as Pattern-0’s bullish formations based on fractal lows and Pattern-3’s price action divergences. Fractal clusters around moving averages (\text{Pattern-7}) and alignment with Fibonacci levels (\text{Pattern-8}) emphasize support and resistance more robustly.

Implementations utilize MQL5's array standard class for precise data management, comparing points and leveraging standard...

πŸ‘‰ Read | NeuroBook | Share!

#MQL5 #MT5 #Indicator
πŸ‘22❀11πŸ†3πŸ‘Œ1πŸ‘¨β€πŸ’»1
Market cycles significantly impact trading decisions. Cyclic patterns are often observed in response to economic news, time, and seasonal factors, aiding traders in predicting price actions. Various analysis methods such as spectral analysis, moving averages, and dot mapping can be utilized to detect these cycles within financial data, providing a deeper understanding of price movements.

Tools like moving averages can identify potential price cycles amidst noise. However, complexities arise when dealing with a mix of sinusoidal signals, necessitating sophisticated approaches like finite differences and wavelet transformations. Despite these methods, market patterns are unpredictable, emphasizing the need for continuous exploration and adaptation in cycle analysis. Understanding cycles enhances technical analysis, offering insights and innovations in marke...

πŸ‘‰ Read | AppStore | Share!

#MQL5 #MT5 #Cycles
πŸ‘50❀19✍4πŸ‘Œ1πŸ‘¨β€πŸ’»1
The concept involves modifying the iCCI indicator to provide clearer signals through color differentiation. The idea is to utilize the iMA formula to enhance visibility and decision-making. By applying this coloring principle, users can gain a better understanding of market dynamics. It's crucial to align oscillator signals with a trend indicator to increase reliability. This method aims to improve the efficiency of the iCCI indicator, offering a more intuitive approach to interpreting data. Implementing such modifications requires careful consideration of market conditions and thorough testing to ensure accuracy and usability. An effective combination of these elements can assist in refining trading strategies.

πŸ‘‰ Read | NeuroBook | Share!

#MQL5 #MT5 #Indicator
πŸ‘32❀10πŸ‘5πŸ‘¨β€πŸ’»3πŸ‘Œ1
Discover the fundamentals of neural networks and their vast potential in trading algorithm development. This article delves into the architecture of multilayer perceptrons (MLP) and deep neural networks, highlighting their strengths in task complexity and practical applications like stock market predictions. Learn about feedforward, convolutional, and recurrent neural networks, and understand the role of activation functions such as ReLU, Sigmoid, TanH, and SoftMax. By exploring input, hidden, and output layers, this piece provides insights into crafting effective neural network architectures, essential for MetaTrader 5 developers pursuing advancements in algorithmic trading solutions. Ideal for both seasoned developers and those looking to enhance their MQL5 coding skills.

πŸ‘‰ Read | Forum | Share!

#MQL5 #MT5 #NeuralNetwork
πŸ‘39❀28πŸ‘€4⚑3πŸ‘¨β€πŸ’»2πŸ‘Œ1
A utility designed for copying trades between MT4 and MT5 accounts is available, allowing seamless integration regardless of whether accounts are Netting or Hedging. Users can filter by instrument name and magic numbers to select positions for copying. The system handles only market positions directly and processes pending orders when they become active market positions. Configuration requires two terminals on the same server to share a data folder for communication. On the sender account, the Adviser operates in sender mode; on the receiver account, it functions in receiver mode. For copying from MT4 to MT5, deploy this utility as the sender and a compatible MT5 product as the receiver. Conversely, for MT5 to MT4 copies, use this as the receiver. More detailed instructions are provided within the utility documentation.

πŸ‘‰ Read | Freelance | Share!

#MQL4 #MT4 #EA
πŸ‘41❀13πŸ‘¨β€πŸ’»3πŸ‘Œ1
Explore a precise approach to enhancing MetaTrader 5 trading strategies using cross-market analysis and algorithmic innovations. By incorporating real-time data from XAGUSD, XAGEUR, and EURUSD, a nuanced strategy emerges, allowing traders to preemptively capture market trends. The solution leverages the inherent links between these markets, aided by technical indicators and statistical models, to refine decision-making and minimize noise. The algorithm uses historical data and machine learning models within MQL5 to streamline operations, offering a structured pathway to improve profitability and reduce volatility in trading performance, maintaining a focus on practical application for developers.

πŸ‘‰ Read | CodeBase | Share!

#MQL5 #MT5 #Strategy
πŸ‘44❀27⚑4πŸ‘€3✍2πŸ‘Œ1🀝1
This utility allows for seamless transaction copying from one MT5 or MT4 account to another MT5 account, supporting both Netting and Hedging account types in any configuration. The utility enables filtering by instrument name and magic numbers for positions to be copied. It currently transmits data solely on market positions; pending orders are addressed once they become market orders. In the Sender mode, one terminal dispatches data, while the other terminal operates in Receiver mode to obtain it. The terminals must reside on the same server to access a common shared data folder for information exchange.

In the Sender account's terminal, activate the utility in Sender mode and configure the necessary settings. For the Receiver account, activate the utility in Receiver mode and adjust the settings accordingly. For transferring between MT5 and MT4, a...

πŸ‘‰ Read | VPS | Share!

#MQL5 #MT5 #Strategy
πŸ‘25❀17πŸ†3πŸ‘¨β€πŸ’»3πŸ‘Œ1
Financial market analysis continually seeks new methods, exploring even unconventional ones like astrology. William Gann popularized this approach, aiming to correlate celestial positions with market trends. Despite ongoing skepticism, some traders still explore financial astrology. Using Python with libraries like Skyfield for astronomical data and MetaTrader 5 for financial data, researchers attempt to combine ancient knowledge with modern technology.

In the process, data collection and synchronization are essential. Despite rigorous statistical analysis, no significant correlations between planetary movements and market prices were found. Machine learning models like CatBoost also failed to produce reliable predictions, confirming astrology's limited value in modern financial markets.

πŸ‘‰ Read | VPS | Share!

#MQL5 #MT5 #Forex
❀21πŸ‘11✍2⚑2πŸ‘Œ2πŸ‘¨β€πŸ’»2😁1