In the study of comets within the astronomical community, the Sun's influence on cometary tails is critically significant. As a comet approaches the Sun, solar radiation and wind lead to the evaporation and ionization of its surface, forming a distinct tail of dust and gases.
The Comet Tail Algorithm (CTA) derives inspiration from this phenomena. The CTA mimics the movement and properties of comets to find optimal solutions. Each solution is viewed as particles in a comet's tail, with the best solution representing the nucleus.
The CTA optimization involves creating an array of comet nuclei and their tails, calculating fitness, updating global solutions, and iteratively refining until optimal solutions are achieved.
Test results show promising efficiency in various conditions, with the CTA algorithm earning a score of 64.96% in performance benchmark...
#MQL5 #MT5 #algorithm #Strategy
Read more...
The Comet Tail Algorithm (CTA) derives inspiration from this phenomena. The CTA mimics the movement and properties of comets to find optimal solutions. Each solution is viewed as particles in a comet's tail, with the best solution representing the nucleus.
The CTA optimization involves creating an array of comet nuclei and their tails, calculating fitness, updating global solutions, and iteratively refining until optimal solutions are achieved.
Test results show promising efficiency in various conditions, with the CTA algorithm earning a score of 64.96% in performance benchmark...
#MQL5 #MT5 #algorithm #Strategy
Read more...
👍40❤22👨💻6👏3🎉3😁2
This expert advisor automatically closes all profitable positions upon detecting a moving average crossover signal. It offers real-time individual buy and sell profit statistics for thorough profit tracking.
Key Parameters:
- Fast MA Period: Defines the period for the fast-moving average.
- Slow MA Period: Defines the period for the slow-moving average.
Usage Scenarios:
- Trend Reversals: Secures profits when market trends reverse, eliminating the need to manually track trades.
- Swing Trading: Effective for swing traders who utilize moving average crossovers to determine optimal exit points.
- Exit Automation: Suited for traders who prefer manual entries but seek automated exits based on a moving average crossover strategy, complete with live performance statistics.
#MQL4 #MT4 #EA #Strategy
Read more...
Key Parameters:
- Fast MA Period: Defines the period for the fast-moving average.
- Slow MA Period: Defines the period for the slow-moving average.
Usage Scenarios:
- Trend Reversals: Secures profits when market trends reverse, eliminating the need to manually track trades.
- Swing Trading: Effective for swing traders who utilize moving average crossovers to determine optimal exit points.
- Exit Automation: Suited for traders who prefer manual entries but seek automated exits based on a moving average crossover strategy, complete with live performance statistics.
#MQL4 #MT4 #EA #Strategy
Read more...
👍24❤14👌6👨💻5😱1
An indicator is available that alerts based on manually drawn trendlines. It requires both a lower and an upper trendline to be in place. Alerts trigger when the price closes above the upper trendline or below the lower trendline. Notifications include full alerts via email and push notifications. This tool is essential for those looking to leverage trendline analysis effectively and efficiently in their trading strategies. Ensure all trendlines are accurately placed to avoid false alerts and improve trading decisions.
#MQL5 #MT5 #Indicator #Alerts
Read more...
#MQL5 #MT5 #Indicator #Alerts
Read more...
👨💻20❤13👍13
A simple script has been developed to translate the monetary figure of a risk percentage ranging from 1% to 10% based on the account balance. This tool is particularly useful for manual traders to quickly determine what a 1% risk equates to for a stop loss or what a certain percentage reward represents for a take profit. The figures dynamically update in real-time according to the current account balance. This eliminates the need to base stop losses or take profits on arbitrary amounts or points. Upon completing its task, the script exits automatically, restoring the chart for further analysis.
#MQL5 #MT5 #script #trading
Read more...
#MQL5 #MT5 #script #trading
Read more...
👍28❤12👨💻5👌4👀4👏3
Discover the intricate world of algorithmic trading by exploring diversified portfolio strategies. This insightful article walks through optimizing a basket of tech stocks like Broadcom, Cisco, Intel, NVIDIA, and Comcast using MetaTrader 5 and Python. Learn practical methodologies for fetching market data, conducting exploratory analysis, and employing the SciPy library for optimal capital allocation. We dissect the role of technical analysis and machine learning to fine-tune trading decisions, maximizing returns while maintaining risk. Ideal for both seasoned traders and developers eager to understand portfolio optimization in volatile markets, this guide bridges complex concepts with clear, actionable steps.
#MQL5 #MT5 #Strategy #algorithm
Read more...
#MQL5 #MT5 #Strategy #algorithm
Read more...
👍19❤15👨💻4👏2
Continuation from the previous article, this piece discusses trailing classes for StopLoss positions.
Base trailing classes allow creation of various algorithms: by stop shift from the current price, by indicators, by specified StopLoss values, and more. With these, one can create and connect stop-shifting algorithms to EAs conveniently.
Three key parameters for trailing: trailing start, trailing step, and trailing distance. These parameters might be replaced by indicator values. Basic checks ensure StopLoss is not too close to the current price and respects symbol properties.
A simple trailing algorithm factors in these parameters to set and update StopLoss positions dynamically, ensuring profitable closure when prices reverse.
#MQL5 #MT5 #EA #Indicator
Read more...
Base trailing classes allow creation of various algorithms: by stop shift from the current price, by indicators, by specified StopLoss values, and more. With these, one can create and connect stop-shifting algorithms to EAs conveniently.
Three key parameters for trailing: trailing start, trailing step, and trailing distance. These parameters might be replaced by indicator values. Basic checks ensure StopLoss is not too close to the current price and respects symbol properties.
A simple trailing algorithm factors in these parameters to set and update StopLoss positions dynamically, ensuring profitable closure when prices reverse.
#MQL5 #MT5 #EA #Indicator
Read more...
👍40❤21👨💻5👏3🏆3💯1
The Trendline Closing EA provides a mechanism for closing trades based on trendline analysis. The EA will close a trade if the price closes below a manually drawn lower trendline or above an upper trendline. It does not open trades; it solely manages the closure of trades that were either opened manually or by other EAs. The use of both upper and lower trendlines is required to avoid operational confusion.
Manual drawing of trendlines is recommended over automated trendline indicators.
Ensure the installation of Trendline Alert V1 from the provided source to enable this functionality. The EA operates on a once per bar basis, so keep the chart on the desired timeframe for the bar closure.
#MQL5 #MT5 #EA #Trendline
Read more...
Manual drawing of trendlines is recommended over automated trendline indicators.
Ensure the installation of Trendline Alert V1 from the provided source to enable this functionality. The EA operates on a once per bar basis, so keep the chart on the desired timeframe for the bar closure.
#MQL5 #MT5 #EA #Trendline
Read more...
👍20❤14✍6⚡2👨💻2
Explore a novel automated trading strategy combining deep learning and traditional technical analysis! This method integrates a Conditional LSTM neural network with the new Volatility Adjusted Momentum (VAM) indicator. VAM, unlike traditional momentum indicators, adjusts for market volatility, offering more reliable signals. The Conditional LSTM is trained using historical data and tech indicators, capturing intricate market relationships missed by conventional techniques.
Implemented as an Expert Advisor (EA) on MetaTrader 5, this strategy leverages both VAM and LSTM predictions for informed trading decisions, including dynamic risk management with ATR-based stop-loss and take-profit adjustments. Enhance your trading strategies with this innovative approach!
#MQL5 #MT5 #VAM #AlgoTrading
Read more...
Implemented as an Expert Advisor (EA) on MetaTrader 5, this strategy leverages both VAM and LSTM predictions for informed trading decisions, including dynamic risk management with ATR-based stop-loss and take-profit adjustments. Enhance your trading strategies with this innovative approach!
#MQL5 #MT5 #VAM #AlgoTrading
Read more...
❤25👍13⚡8👨💻2
MetaTrader 5 Platform build 4570 introduces numerous new features and improvements to the web platform:
• A crosshair mode for accessing precise values and measuring distances on the chart, as well as a new line chart type.
• Ability to enable additional information in the Market Watch in the the mobile version.
• Expanded list of supported hotkeys for more efficient chart operations.
New machine learning functions are now available in MQL5. These include integration with the OpenBLAS matrix computation library and improved ONNX Runtime support to enable the execution of more complex neural models.
Additionally, the platform now offers improved tick history downloading and exporting features. Also, we have fixed bugs in testing agents that could lead to excessive RAM consumption.
Update to the latest version and experience all the new features
• A crosshair mode for accessing precise values and measuring distances on the chart, as well as a new line chart type.
• Ability to enable additional information in the Market Watch in the the mobile version.
• Expanded list of supported hotkeys for more efficient chart operations.
New machine learning functions are now available in MQL5. These include integration with the OpenBLAS matrix computation library and improved ONNX Runtime support to enable the execution of more complex neural models.
Additionally, the platform now offers improved tick history downloading and exporting features. Also, we have fixed bugs in testing agents that could lead to excessive RAM consumption.
Update to the latest version and experience all the new features
👍55❤29👨💻6🔥4👏3
The TL Short Close EA closes a short trade when the bar closes above the upper trendline for a loss or touches the lower trendline for a profit. The TL Long Close EA, on the other hand, closes a long trade when the bar closes below the lower trendline for a loss or touches the upper trendline for a profit.
Ensure trendlines are drawn manually or through an auto trendline indicator, though manual drawing is preferred. Note that this tool does not open trades but rather closes manually or EA-opened trades.
Both upper and lower trendlines must be drawn for proper functionality. Download required indicators from the comment section. The Expert Advisors operate based on once-per-bar logic, so maintain the chart on the desired timeframe for accurate bar closure.
#MQL5 #MT5 #EA #Strategy
Read more...
Ensure trendlines are drawn manually or through an auto trendline indicator, though manual drawing is preferred. Note that this tool does not open trades but rather closes manually or EA-opened trades.
Both upper and lower trendlines must be drawn for proper functionality. Download required indicators from the comment section. The Expert Advisors operate based on once-per-bar logic, so maintain the chart on the desired timeframe for accurate bar closure.
#MQL5 #MT5 #EA #Strategy
Read more...
❤18👍15👨💻4
Copying and pasting graphical objects between open charts in MetaTrader can be challenging due to the absence of a native "Copy & Paste" feature. While templates can be used, they save the entire chart state, which may include irrelevant data. To address this, the ChartObjectsCopyPaste.mq5 indicator has been developed. This indicator allows for the copying of selected objects to the clipboard to be pasted onto other charts.
The indicator is based on ObjectGroupEdit.mq5 from the algotrading book and utilizes classes like ObjectMonitor and MapArray. It requires attachment to at least two charts: a source chart for copying objects and a target chart for pasting them. The process uses Ctrl+Q to copy and Ctrl+J to paste, due to MetaTrader's interception of standard hotkeys.
The indicator uses system DLLs to access the Windows clipboard, requiring DLL i...
#MQL5 #MT5 #Indicator #AlgoTrading
Read more...
The indicator is based on ObjectGroupEdit.mq5 from the algotrading book and utilizes classes like ObjectMonitor and MapArray. It requires attachment to at least two charts: a source chart for copying objects and a target chart for pasting them. The process uses Ctrl+Q to copy and Ctrl+J to paste, due to MetaTrader's interception of standard hotkeys.
The indicator uses system DLLs to access the Windows clipboard, requiring DLL i...
#MQL5 #MT5 #Indicator #AlgoTrading
Read more...
👍15❤5👨💻4
Explore the implementation of a robust Trend Constraint Expert Advisor in MetaTrader 5. This article delves into integrating seven renowned trading strategies, focusing on the trend following method using moving averages. Transitioning from daily candles to minute (M1) timeframes, it optimizes entry levels with the Relative Strength Index (RSI). Learn how magic numbers streamline multi-strategy trading and ensure precise trade association. Finally, see how moving averages are mathematically employed to determine trends, enhancing trade accuracy. Ideal for both seasoned and aspiring algo traders, this piece offers actionable insights into elevating your trading algorithms.
#MQL5 #MT5 #Strategy #AlgoTrading
Read more...
#MQL5 #MT5 #Strategy #AlgoTrading
Read more...
❤21👍11👀5🤯2👏1👨💻1
Part 6 covered integrating responsive inline buttons for bot interaction. In this part, the focus shifts to automating the addition of indicators on MetaTrader 5 charts using commands from Telegram.
The system involves capturing user-defined indicator parameters via Telegram, parsing the data, and applying the indicators to trading charts in real-time.
The first section covers how traders can use Telegram to control indicators on MetaTrader 5, followed by parsing and processing these commands, then executing the indicators in MQL5. Thorough testing ensures the system operates smoothly.
By the end, traders will have a fully functional system for real-time indicator automation via Telegram and MetaTrader 5.
#MQL5 #MT5 #Indicator #EA
Read more...
The system involves capturing user-defined indicator parameters via Telegram, parsing the data, and applying the indicators to trading charts in real-time.
The first section covers how traders can use Telegram to control indicators on MetaTrader 5, followed by parsing and processing these commands, then executing the indicators in MQL5. Thorough testing ensures the system operates smoothly.
By the end, traders will have a fully functional system for real-time indicator automation via Telegram and MetaTrader 5.
#MQL5 #MT5 #Indicator #EA
Read more...
👍21❤12👨💻3👏2
Continuing the series on building the Connexus library, this article will cover HTTP protocol mechanisms, URL structure, and constructing two key initial classes: CQueryParam for managing query parameters and CURL for handling complete URL elements.
HTTP Overview:
- HTTP is a stateless protocol layered on TCP/IP.
- Comprises request line (method, URL, version), headers, and body.
- Common methods: GET, POST, PUT, DELETE, PATCH.
- Status codes: 1xx (info), 2xx (success), 3xx (redirect), 4xx (client error), 5xx (server error).
URL Structure:
- Components: Protocol, Domain, Port (optional), Path, Query Params, Fragment (not supported in Connexus).
- Example breakdown: https://www.example.com:8080/market/symbols?active=EURUSD&timeframe=h1.
Class Construction:
- CURL: Manages URL components pragmatically.
- CQueryParam: Converts query strings to structured J...
#MQL5 #MT5 #Algorithm #HTTP
Read more...
HTTP Overview:
- HTTP is a stateless protocol layered on TCP/IP.
- Comprises request line (method, URL, version), headers, and body.
- Common methods: GET, POST, PUT, DELETE, PATCH.
- Status codes: 1xx (info), 2xx (success), 3xx (redirect), 4xx (client error), 5xx (server error).
URL Structure:
- Components: Protocol, Domain, Port (optional), Path, Query Params, Fragment (not supported in Connexus).
- Example breakdown: https://www.example.com:8080/market/symbols?active=EURUSD&timeframe=h1.
Class Construction:
- CURL: Manages URL components pragmatically.
- CQueryParam: Converts query strings to structured J...
#MQL5 #MT5 #Algorithm #HTTP
Read more...
👍38❤16👏5👨💻5
A new script has been developed for MT5 that checks and deletes chart objects. It scans the current chart for any available objects, counts them, and deletes them as required. Additionally, it logs the names of the objects present on the chart. This script is particularly useful for maintaining a clean and organized workspace. The ability to efficiently manage chart objects without manual intervention can significantly enhance workflow and productivity. Utilizing such tools ensures that unnecessary chart clutter is minimized, allowing for more focused analysis and decision-making. Advanced users and developers are encouraged to integrate this script into their regular chart management routines.
#MQL5 #MT5 #script #algorithm
Read more...
#MQL5 #MT5 #script #algorithm
Read more...
❤20👍17👨💻4👀4✍3
Discover the power of adaptive indicators in MetaTrader 5! Traditional indicators fall short by using constant ratios, but adaptive indicators revolutionize trading with dynamic feedback mechanisms adjusting to market conditions. Explore methods like least squares, error handling, Laplace smoothing, and parameter optimization for robust adaptive indicators. Practical insights include averaging errors, calculating stable SL values, and detailed examples of indicators with adaptive ratios. These innovations bolster self-adjustment capabilities, offering new avenues in technical analysis. Perfect for traders and developers aiming to elevate their algorithmic trading strategies. Dive in to refine your trading tools with cutting-edge adaptability.
#MQL5 #MT5 #Indicator #Algorithm
Read more...
#MQL5 #MT5 #Indicator #Algorithm
Read more...
👍25❤14👌5👨💻5👀4
The Doji Pattern Detector EA offers automated detection of Doji candlestick patterns on any chart. A Doji pattern signifies market indecision, occurring when a candle's open and close prices are nearly identical. This EA identifies such candles where the open and close prices fall within a small, predefined range near the midpoint of the candle's high and low.
Key Features:
- Doji Detection: Ensures the open-close price difference is less than 3 points and that these prices are near the midpoint of the high-low range with a 10% tolerance.
- Chart Marking: Highlights detected Doji candles by placing a red arrow 5 points below the candle's low, with a "Doji" label 3 points below the arrow for easy visual identification.
- Alerts and Notifications: Generates alerts and messages when a Doji pattern is found on the previously closed candle.
This tool is benefic...
#MQL4 #MT4 #EA #Indicator
Read more...
Key Features:
- Doji Detection: Ensures the open-close price difference is less than 3 points and that these prices are near the midpoint of the high-low range with a 10% tolerance.
- Chart Marking: Highlights detected Doji candles by placing a red arrow 5 points below the candle's low, with a "Doji" label 3 points below the arrow for easy visual identification.
- Alerts and Notifications: Generates alerts and messages when a Doji pattern is found on the previously closed candle.
This tool is benefic...
#MQL4 #MT4 #EA #Indicator
Read more...
❤20👍15👌2⚡1👨💻1
The PTB.mq5 indicator is tailored for the MetaTrader 5 trading platform and focuses on calculating and displaying both short-term and long-term price extremes. It also incorporates Fibonacci retracement levels to assist traders in identifying potential market reversals.
Key features of the PTB.mq5 indicator include:
Short-Term High and Low: Computes the highest and lowest prices over a user-defined short length, aiding traders in pinpointing immediate support and resistance levels.
Long-Term High and Low: Calculates the highest and lowest prices over a longer duration, offering insights into overarching market trends.
Fibonacci Levels: Plots critical Fibonacci retracement levels (23.6%, 38.2%, 50%, 61.8%, and 78.6%) based on long-term highs and lows.
Input Parameters:
- `shortLength`: Specifies the number of candles for short-term high and low ca...
#MQL5 #MT5 #Indicator #Fibonacci
Read more...
Key features of the PTB.mq5 indicator include:
Short-Term High and Low: Computes the highest and lowest prices over a user-defined short length, aiding traders in pinpointing immediate support and resistance levels.
Long-Term High and Low: Calculates the highest and lowest prices over a longer duration, offering insights into overarching market trends.
Fibonacci Levels: Plots critical Fibonacci retracement levels (23.6%, 38.2%, 50%, 61.8%, and 78.6%) based on long-term highs and lows.
Input Parameters:
- `shortLength`: Specifies the number of candles for short-term high and low ca...
#MQL5 #MT5 #Indicator #Fibonacci
Read more...
❤19👍16👌5🔥1👨💻1
The CDebugLogger Class V2 is an advanced logging utility tailored for MQL4/5 environments, offering versatile monitoring, debugging, and application behavior tracking. This version introduces notable enhancements, including a debounce mechanism for event-driven systems like OnTick, OnTimer, and OnChartEvent, along with new filtering and silencing options to pinpoint relevant log entries.
Key Features:
1. Multiple Log Levels: Log messages at INFO, WARNING, ERROR, and DEBUG levels to filter by significance.
2. Timestamp Inclusion: Customizable timestamp formats to track event timings.
3. File Logging: Options for enabling/disabling file logging, specifying paths, and saving logs in CSV format.
4. Contextual Information: Include function signatures, file names, and line numbers for clarity.
5. Silent Keywords: Prevent logging of sensitive information by ...
#MQL5 #MT5 #logging #developer
Read more...
Key Features:
1. Multiple Log Levels: Log messages at INFO, WARNING, ERROR, and DEBUG levels to filter by significance.
2. Timestamp Inclusion: Customizable timestamp formats to track event timings.
3. File Logging: Options for enabling/disabling file logging, specifying paths, and saving logs in CSV format.
4. Contextual Information: Include function signatures, file names, and line numbers for clarity.
5. Silent Keywords: Prevent logging of sensitive information by ...
#MQL5 #MT5 #logging #developer
Read more...
👍21❤9👨💻3⚡2👀2
This tool is designed to calculate position risk based on inputted lot size and stop loss levels. Users can select a point on the chart to set a virtual stop loss, which then calculates both the risk percentage and monetary risk figure for the chosen stop loss and lot size.
In the input section, users can specify whether the calculation is from the ask price (buy positions) or the bid price (sell positions) by selecting buy or sell. The risk is affected by the stop loss distance and the timeframe, as a long stop loss distance on higher timeframes will result in greater risk due to a larger number of points.
This tool is versatile and should function on all types of securities, providing a comprehensive risk analysis for traders.
#MQL5 #MT5 #RiskCalc #TradingTools
Read more...
In the input section, users can specify whether the calculation is from the ask price (buy positions) or the bid price (sell positions) by selecting buy or sell. The risk is affected by the stop loss distance and the timeframe, as a long stop loss distance on higher timeframes will result in greater risk due to a larger number of points.
This tool is versatile and should function on all types of securities, providing a comprehensive risk analysis for traders.
#MQL5 #MT5 #RiskCalc #TradingTools
Read more...
👍24❤12👨💻1