MQL5 Algo Trading
388K 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
Discover how the evolution of Parafrac oscillators can enhance your algorithmic trading strategies. By standardizing PSAR-price gaps using fractal range and ATR, these tools unveil distinct trend structures. An in-depth comparison of Parafrac and Parafrac V2 across three strategiesβ€”Zero-Line Cross, Histogram Momentum Shifts, and Histogram-Candle Combinationβ€”reveals their strengths. Backtesting on GBP/USD H1 highlights how the ATR-based Parafrac V2 offers higher profitability under specific conditions, while the original excels in select scenarios. Learn how optimizing parameters like stop loss and Reward-to-Risk Ratio can refine performance, ensuring your algorithm responds effectively to market dynamics.

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL5 #MT5 #Strategy
❀42πŸ‘9πŸ‘Œ5πŸ†4⚑3πŸ‘2πŸ‘¨β€πŸ’»1
Elevate your trading strategy by incorporating a robust statistical arbitrage framework for MetaTrader 5. This method focuses on creating a mean-reversion strategy with cointegrated Nasdaq stocks alongside Nvidia (NVDA), prioritizing market neutrality. A comprehensive scoring system evaluates stock pairs through criteria like Engle-Granger and Johansen cointegration tests, spread stationarity, and liquidity. This framework efficiently screens thousands of stock combinations, maintaining a focus on stability and tradeability. Detailed correlation and cointegration analyses ensure a well-informed selection process, paving the way for a robust, data-driven, and economically meaningful portfolio development. Such a strategy optimizes resource allocation and enhances trading edges through meticulous screening and backtesting.

πŸ‘‰ Read | Freelance | @mql5dev

#MQL5 #MT5 #Strategy
❀73πŸ‘¨β€πŸ’»9πŸ†6πŸ‘Œ4✍1
This project's recent advancement expands on our Shark Pattern system by incorporating a Trendline Breakout System in MQL5. It accurately identifies and trades on the breakouts of support and resistance levels. Utilization of swing points validated by R-squared and angle constraints ensures reliability in detecting market momentum shifts.

The system automates trendline detection, drawing, and breakout signals through comprehensive logic that includes handling the lifecycle of trendlines and managing trading signals in real-time. Our approach emphasizes capturing significant market trends while managing risks effectively.

With integrations for visualization and trade execution, this critical system supports automated response to market changes, with customizable settings for diverse trading strategies.

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #Strategy
❀69πŸ†8πŸ‘Œ7πŸ‘2⚑1πŸ‘¨β€πŸ’»1
In analyzing financial trading strategies, it becomes clear that traditional methods often fail to account for the dynamic nature of markets. The classical Bollinger Band strategy, while widely used, demonstrates consistent losses in backtests. Our analysis shows a -$169 loss over five years with a suboptimal Sharpe ratio of -0.53.

The double Bollinger Band system, an extension developed by institutional traders, improves market adaptability. By employing dual bands with varied standard deviations, this strategy significantly outperforms the classical approach. Results indicate a $228 profit, improving accuracy to 56% winning trades and delivering a positive Sharpe ratio of 0.5.

This advancement showcases resourceful adaptations of established methods, yielding a transformative trading strategy that enhances profitability and reduces risk without a...

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #Strategy
❀38✍4πŸ†2πŸ‘¨β€πŸ’»2
Testing trading strategies in a controlled environment enables precise calibration of variables like StopLoss and TakeProfit levels. A recent assessment demonstrated unexpected profitability by adjusting these elements. The experiment also examined integrating various trailing stop methods, including Parabolic SAR and moving averages. By utilizing trailing stops, specifically those based on double exponential moving averages, a notable increase in profitability was observed compared to original trading settings. However, not all indicators provided positive outcomes. Customization of trailing parameters per symbol is advisable for optimal results, as individual symbol characteristics influence trading performance significantly.

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL5 #MT5 #Strategy
❀51πŸ”₯6πŸ‘Ύ2πŸ‘¨β€πŸ’»1
The study presents significant insights into trading systems using random win-rate management and Monte Carlo simulation. Traders often exit trades at random profit levels, affecting the overall profitability due to variable win-rates and RRRs.

Monte Carlo simulation effectively models random trade outcomes, illustrating how different RRRs impact equity curves and drawdowns. The analysis emphasizes the importance of expectancy in assessing system profitability, showing that a positive expectancy leads to overall gains, while a negative expectancy results in losses.

Visual inspections and analyses highlight that higher win-rate strategies, although potentially profitable, often carry higher drawdowns. Effective strategy optimization requires managing win-rates and RRRs to sustain long-term profitability.

πŸ‘‰ Read | Signals | @mql5dev

#MQL5 #MT5 #Strategy
❀26πŸ‘5πŸ‘Œ3πŸ‘1πŸ‘¨β€πŸ’»1
The previous discussion introduced the 5-0 Harmonic Pattern in MQL5, moving beyond the common Gartley pattern. This entry will cover the identification of points C and D to finalize the 5-0 structure. Recognizing the 5-0 pattern involves detecting specific points on a price chart programmaticallyβ€”0, X, A, and B have been identified, and now points C and D need to be established.

For point C, check for a rally that follows B, aiming for a Fibonacci extension between 161.8% and 224% of the AB leg. This corrective action often highlights a strong market reaction, offering clues for the eventual completion of the structure.

Finally, identify point D as it forms a retracement from C, typically between 50% and 55% of the BC leg. This zone represents potential trading opportunities. The program should connect the detection logic with trade execution to visually ve...

πŸ‘‰ Read | AppStore | @mql5dev

#MQL5 #MT5 #Strategy
❀21πŸ‘Œ3πŸ‘2πŸ‘1🀯1πŸ‘¨β€πŸ’»1πŸ‘€1
The tool offers a detailed view of price levels for simulated trades, with user-defined Take Profit (TP) and Stop Loss (SL) values set as percentages. It supports both Buy and Sell directions. Users can benefit from access to concise statistics including an hourly entry breakdown, allowing better analysis and decision-making. This structured presentation of trade parameters and statistics aids in evaluating potential outcomes and optimizing trading strategies. A useful resource for strategic planning and review of projected trade scenarios.

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL4 #MT4 #Strategy
❀30πŸ‘Œ6πŸ‘¨β€πŸ’»4
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
❀48πŸ‘10⚑4πŸ‘¨β€πŸ’»4πŸŽ‰2πŸ‘Œ2πŸ’”2
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
❀38πŸ‘Œ4πŸŽ‰2πŸ‘¨β€πŸ’»2
Analyzing trading signals on a 15-minute chart involves integrating multiple indicators for precision. The MACD serves to give an early direction indication. A primary signal depends on the Parabolic SAR, signaling buy or sell moments. A buy signal emerges if the third candle ago was below the SMA, with a subsequent candle closing above the SMA, and the SAR switches below the price. Complementarily, if the MACD indicates a bullish move while the SAR flips below the price, but close[1] hasn’t closed above the SMA, wait for up to 5 candles for confirmation.

Conversely, a bearish signal appears when a candle closes below the SMA after a 3-candle sequence, with the SAR transitioning above the price. Aligning such strategies leverages simultaneous or prior MACD confirmation of the trend direction.

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL4 #MT4 #Strategy
❀54πŸ‘¨β€πŸ’»8πŸ‘3⚑1✍1πŸŽ‰1πŸ†1
In the current phase of our statistical arbitrage project, we focus on integrating the stability of portfolio weights and time to mean reversion. The previous analysis relied on liquidity and cointegration strength but omitted these key aspects. We intend to enhance the scoring system by including these metrics.

Stability of portfolio weights is crucial as dynamic changes in financial markets can destabilize weights, risking a breakdown in mean reversion. Regular testing for weight stability prevents strategy pitfalls and adapts to market shifts. Additionally, the half-life of mean reversion quantifies the time expected for spread deviations to halve, influencing position management and risk exposure. A shorter half-life indicates more frequent trading opportunities with lower capital risk. Understanding and incorporating these factors will refine o...

πŸ‘‰ Read | Calendar | @mql5dev

#MQL5 #MT5 #Strategy
❀50πŸ‘8πŸ‘Œ4πŸ‘¨β€πŸ’»4⚑2πŸ‘€2✍1
In Part 10 of our series on MQL5 for Expert Advisors, we introduce a strategy tracker system that enhances real-time performance monitoring. This system is capable of detecting moving average crossover signals filtered by a long-term moving average, and visualizes trade actions on the chart. It provides a comprehensive dashboard with performance metrics, including total signals, wins/losses, profit points, and success rates.

Implementation involves creating enumerations, input parameters, global variables, and helper functions for visualization. We leverage the MQL5 environment to handle moving averages, signal detection, and position tracking. Key features include modular dashboard creation, signal visualization, and both virtual and real trade simulations. This tool supports strategy evaluation, allowing for dynamic adjustments based on detailed f...

πŸ‘‰ Read | AppStore | @mql5dev

#MQL5 #MT5 #Strategy
❀39πŸ‘9πŸ‘Œ2πŸ‘¨β€πŸ’»2
Explore the power of time-filtered trading within the MQL5 framework, where precision meets discipline. Using modular components such as the TimeFilter layer and SessionVisualizer, we can define specific trading windows, ensuring trades execute only during optimal market conditions. This approach minimizes noise and leverages session-based volatility, providing clarity and adaptability in trading strategies. By combining clock, session, and event-driven controls, traders and developers can create sophisticated automated systems that respond not just to price signals, but aligned with the market's temporal rhythm, enhancing decision accuracy and strategic performance in algorithmic trading environments.

πŸ‘‰ Read | Docs | @mql5dev

#MQL5 #MT5 #Strategy
❀25πŸŽ‰4πŸ‘Œ2πŸ‘¨β€πŸ’»2
The application of one-position-type strategies in live market environments presents an analysis based on Nvidia Corp’s stock (NVDA). Training and testing were conducted over distinct time periods, utilizing signals derived from multiple oscillator integrations, specifically RSI and DeMarker. Each pattern analyzes specific market movements, aiming to optimize entry and exit points across varying market conditions.

Pattern-5 focuses on slope confluence with range expansion, where synchronized momentum and price movements are logged. The buy signals are derived when RSI and DeMarker conditions align, demonstrating increased trader activity and potential market volatility.

Forward testing of Pattern-6 capitalizes on leading price movements with lagging indicators, identifying pullback entries for order continuation. The setup confirms trend strength w...

πŸ‘‰ Read | CodeBase | @mql5dev

#MQL5 #MT5 #Strategy
❀22✍1πŸ‘¨β€πŸ’»1
Enhancing black-box models for trading strategy selection presents complex challenges. Traditional metrics like RMSE often mislead due to sensitivity to scale and lack of comparability across regression targets. Mutual Information (MI) offers a more robust alternative. Its nonparametric nature and unitless measurement provide a consistent comparison across targets, helping identify the most informative strategies.

Empirical results demonstrate MI's superiority. Models predicting changes in the Stochastic oscillator show marked improvements, reflecting market width better than others. Visual analysis through scatterplots and bar plots further validate these findings, reinforcing MI's reliability.

In application, a neural network model, backed by ONNX, enables real-time strategy execution in MQL5, leveraging newfound insights for improved decision-ma...

πŸ‘‰ Read | AlgoBook | @mql5dev

#MQL5 #MT5 #Strategy
❀1