MQL5 Algo Trading
388K subscribers
2.57K photos
2.57K 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
A professional Grid advisor that utilizes the Relative Strength Index (RSI) is now available for integration in trading systems. This advanced tool reduces drawdown on accounts by managing unprofitable orders through strategic overlapping. Users gain clear insights into profits via the chart display, enhancing utility for manual trading operations.

The advisor is optimized for use with ECN brokers that offer low spreads, improving execution and potential profitability. It is strongly recommended to initially test this tool on a demo account to familiarize with its functionalities. Additionally, pairing this advisor with Buy Sell Signals can facilitate trend following and allow for semi-automatic operation, where users can specify conditions such as "Buy Only" or "Sell Only".

Key customization options include adjustable RSI periods, bounds, and timeframes. Management features extend ...

Read more...
πŸ‘8πŸ‘2
Understanding Trailing Stops: A Guide for Traders

Trailing stops are critical tools for capitalizing on gains while minimizing risks. They dynamically adjust to price movements in favorable directions but remain static when the trend reverses. Trailing stop mechanisms vary, with platforms like MetaTrader offering integrated options which can also be incorporated into Expert Advisors.

Traders can customize trailing stops using market data, technical indicators, and varying methodologies that intertwine trading strategies with risk management practices. The setup of a trailing stop involves defining parameters that balance potential profit against the risk, accounting for factors like market volatility and transaction costs.

Effective use of trailing stops requires a strategic approach to setting stop loss levels. They should not only cover all incurred costs like swaps and commissio...

Read more...
✍4πŸ‘3πŸ‘1
In the latest analysis of the Modified Grid-Hedge EA, attention is focused on the mathematical dimension of optimizing Grid EA strategies. With an existing framework as the baseline, this detailed examination uncovers the core mathematical strategies that guide the EA's behavior, setting the stage for future code-based enhancements.

This segment does not cover the coding aspects; instead, it delves into the theoretical constructs, formulas, and calculations needed to optimize trading strategies effectively. From a comprehensive recap of Grid Strategy to evaluating parameters like Initial Position, Initial Lot Size, Distance, Lot Size Multiplier, and Number of Orders, the groundwork is laid for quantitatively assessing various trading strategies and outcomes.

Analyzing the profit function for a scenario with sequentially increasing lot sizes reveals intricate relationships between or...

Read more...
✍3πŸ‘3πŸ‘2
The Closed-Form Policy Improvement (CFPI) algorithm offers a new perspective for addressing the instability noted in offline reinforcement learning models which traditionally rely on stochastic gradient descent (SGD). The CFPI algorithm mitigates the need for hyperparameter tuning, often challenging due to limited interactions with the environment, providing a more stable avenue for policy training. By utilizing a first-order Taylor approximation, CFPI constrains the distributional shifts and models behavior policies closely resembling the training data distribution.

Highlighting a key feature, the CFPI method avoids the typical fluctuations in policy performance associated with SDS-based approaches by engaging a deterministic policy shift towards value improvement. The researchers outlined the benefits of modeling behavioral strategies using a mixture of Gaussian distributions. This...

Read more...
πŸ‘4πŸ‘2πŸ‘€1
Causal inference is fundamental in diverse fields such as econometrics, medicine, and marketing. However, the approach holds particular intrigue for those designing algorithmic trading systems in machine learning landscapes. While ancient philosophers like Aristotle attempted to embed causality into the crux of scientific understanding, modern developments in machinery and algorithms have observed a shift in comprehension. Today, causal inference zeroes in on separating correlation from causation to forge reliable decision-making frameworks.

Machine learning techniques, particularly in the realm of trading, must grapple with causal relationships to enhance prediction accuracy and reliability. The utilization of advanced causal inference methods indicates that although machine learning can interpret data to predict outcomes, discerning the true causal effects remains complicated. This...

Read more...
πŸ”₯4πŸ‘2πŸ‘2❀1
For traders utilizing MT5, a new script is available that automates order placement ahead of high-impact news events. To deploy, simply double-click the script approximately two minutes before news releases such as FOMC, NFP, bank rates, or CPI announcements. The script is designed to set both Buy Stop and Sell Stop orders swiftly to capitalize on rapid pip movements.

Key features include assignable hotkeys, with the recommendation to use CTRL + 1 for quick access. The script incorporates Stop Loss functions to secure trades if the market moves against the predicted direction, along with a preset Target for potential profits.

Users should note that this tool is advised for use with significant, market-moving ("RED") news only. If the set ordersβ€”Buy Stop and Sell Stopβ€”are not activated within three minutes post-announcement, it is recommended to cancel the orders and prepare for the ...

Read more...
πŸ‘6❀2πŸ‘2πŸ‘Œ2
The Bacterial Foraging Optimization (BFO) algorithm, inspired by the foraging behavior of Escherichia coli bacteria, serves as a robust technique for addressing complex numerical optimization problems. BFO mimics the natural tactics of E. coli, utilizing mechanisms like chemotaxisβ€”where movement is guided by chemical cues. This algorithm is especially noteworthy in distributed optimization and control tasks across various real-world applications. Utilizing a combination of bacterial behaviors such as swimming and tumbling, the BFO algorithm enhances the search for nutrient gradients, effectively navigating through solution spaces.

Key components of BFO include initialization of a bacterial colony, execution of chemotactic steps where bacteria either swim towards favorable conditions or tumble in adverse environments, and replication phases ensuring survival of the fittest, thus foste...

Read more...
πŸ€”9πŸ‘2❀1πŸ‘1
An optimized version of the Hurst exponent indicator has been recently updated for enhanced performance. It is built upon the initial version which has been thoroughly described, providing users with improved computational efficiency. While further optimizations are possible, such as implementing a faster approximation of logarithms, these would result in a trade-off between speed and accuracy. The current improvements focused on significant computational enhancements without drastic sacrifices in precision. This refined tool is crucial for those who rely on detailed quantitative analysis in their programming and technical work.

Read more...
πŸ‘10πŸ‘1
In the realm of optimization, particularly focusing on population-based algorithms, multi-population strategies offer a nuanced approach by employing multiple independent groups to enhance problem-solving capabilities. This method facilitates diverse explorations of the solution space through parallel processing by unrelated populations, while strategically sharing inter-group findings to refine solutions.

Multi-population and multi-swarm techniques, though distinctly powerful, integrate cooperative dynamics within their core framework. Utilizing multiple social groups, or 'swarms', these algorithms foster an interconnected learning environment where individual groups evolve based on shared successes and adapt dynamically to changing problem landscapes. As each group functions with a semi-autonomous strategy, the collective synergy leads to improved performance in finding optimal sol...

Read more...
πŸ‘8πŸ‘1
Goal-Conditioned Behavior Cloning (BC) offers a significant approach for tackling varied problems in offline reinforcement learning, veering from the traditional method of evaluating states and actions. By aligning an agent's actions with predetermined goals under specific environment states, BC leverages supervised learning techniques and historical data to train the agent’s behavior policy. Highlighting the approach, recent papers have shown sequence modeling's role in enhancing policy learning from offline trajectories, posing queries about optimal goal-setting for learning trajectories and devising effective policies.

A key development discussed is the Goal-Conditioned Predictive Coding (GCPC), which integrates sequence modeling into a two-stage framework to refine agent behavior. This innovative model involves pre-training to compress trajectory data into nuanced representations...

Read more...
✍3πŸ‘3πŸ‘3❀1
The latest version of MetaTrader 5 build 4350 introduces new analytical objects to the web platform. Utilize the ruler to measure time and prices, draw shapes (rectangle, ellipse, triangle, and circle), and add labels to your charts.

The new Welcome page in MetaEditor will assist trading app developers. Access educational materials, stay informed with the latest news and monitor your sales.

In addition, Copilot's code completion feature now supports the latest ChatGPT model, GPT-4o.

Read more...
πŸ”₯7πŸ‘3πŸ‘3❀2✍1
In exploring the development of large language models (LLMs) using CPU-based systems, it's crucial to acknowledge the current landscape where most models rely on Transformers. Software libraries such as 'Transformers' and 'tiktoken' provide robust data processing methodologies that integrate seamlessly with these models. Specifically, tokenizers perform pivotal functions within Natural Language Processing (NLP), converting text into tokens that can be transformed into input vectors understandable by computers.

This post delves into the practical aspects of training LLMs on CPUs, particularly focusing on generating and processing datasets, a critical but often challenging part of model training. It is highlighted that despite the potential limitations of using CPUsβ€”such as the inability to handle complex model functionsβ€”various model versions are accommodative of different hardware ca...

Read more...
πŸ‘8πŸ”₯1πŸ‘1
In the realm of time-sensitive computing operations, validation of user-defined settings is critical. A function effectively manages this by verifying if user-selected time periods are permissible. It accepts two parameters: "allowedPeriods," an array listing the time intervals approved by the system, and "periodsToCheck," which includes the intervals selected by the user.

The processing involves a straightforward validation loop where each entry in "periodsToCheck" is cross-referenced with "allowedPeriods." Should any period from the user’s selection not be listed in the allowed array, the function terminates and returns "false," signaling an invalid or unauthorized choice. Conversely, a consistent match across all entries results in a return value of "true," confirming all user-selected periods are valid.

This method ensures system integrity and adherence to predefined constrain...

Read more...
πŸ‘2
In this installment of the series on wizard-assembled Expert Advisors, the focus shifts to the incorporation of economic calendar news into the Expert Advisor during testing. This integration aims to either validate a trading concept or enhance the robustness of a trading system. The discussion primarily harnesses the capabilities of the MQL5 IDE tools.

One pivotal aspect covered is the potential trading edge that economic data can bring to a trading system, emphasizing fundamental analysis over technical approaches. Such economic fundamentals include inflation rates, central bank interest rates, and unemployment rates, among others. These elements are crucial as they often trigger volatility in the markets following news releases, with non-farm payroll data being a prominent example.

Moreover, the article explores the utility of SQLite databases within the MetaEditor IDE, proposing...

Read more...
πŸ‘5❀3πŸ‘2
Understanding Data Management and Basic Programming Concepts in MQL5

In programming, particularly in MQL5, understanding functions, algorithms, and data storage is crucial. Functions perform specific tasks based on predefined steps called statements, which include comparisons, repetitions, or data manipulation. Each function operates within an algorithm, a sequence of instructions to solve more extensive tasks. MQL5 supports programming trading actions varying in approach as the same objective can be achieved with different algorithms.

Data in programming is essential and can range from price values to graphical coordinates or sound playback triggers. Data is stored in Random Access in two forms: variables and constants. Variables can change during program execution, whereas constants remain fixed. Knowing these distinctions helps in optimizing program efficiency and debugging.

Spe...

Read more...
πŸ‘6✍2❀1πŸ‘1
Gradient Boosted Decision Trees (GBDT) are utilized in both regression and classification tasks, employing multiple weak learnersβ€”usually decision treesβ€”to form a robust predictive model. Three major implementations of GBDT are XGBoost, LightGBM, and CatBoost, each offering unique advantages. XGBoost is known for its efficiency and scalability, making it a favorable choice for large-scale applications. LightGBM excels in performance and efficiency, particularly suitable for large datasets due to its faster training speeds and lower memory usage. CatBoost, on the other hand, automatically handles categorical features and provides robustness against overfitting.

These techniques collectively enhance machine learning models by sequentially correcting previous errors, leveraging gradient descent to minimize loss, and incorporating regularization to prevent overfitting. Each iteration of ...

Read more...
πŸ‘5πŸ”₯1πŸ‘1
In a focused effort to enhance the efficiency of social group algorithms, a new approach has been proposed to facilitate sector-based movement and group memory in search spaces. Unlike traditional methods which allow unrestricted traversal, this model enables groups to hop between defined sectors, updating their central coordinates with each iteration. This structure supports the incorporation of individual and collective memory components, significantly refining the search process by utilizing prior knowledge of optimal solutions.

This alteration not only broadens the scope for analyzing social group dynamics but also improves the information exchange and the adaptation mechanism within these groups. Empirical tests are outlined to assess the impact of these innovations on the group's search performance, aiming to provide insights into social system evolution and potential enhanceme...

Read more...
πŸ‘5πŸ‘1😎1
The CLS (ClearScreen) function is designed to enhance chart readability by removing all objects drawn on the chart upon the pressing of the key "C". This provides a convenient approach for users needing to reset their view without manually deleting individual elements, effectively streamlining the user interaction within trading platforms. This feature is particularly useful in environments where quick visualization adjustments are crucial to a trader's decision-making process.

Read more...
πŸ‘7πŸ‘1
The NaΓ―ve Bayes classifier is a foundational tool in the machine learning toolkit, leveraging Bayes' theorem to perform classification tasks by assuming feature independence. This simple yet robust model is especially advantageous in contexts where the interrelationships among features are minimal or can be ignored, allowing for rapid decisions based on probabilistic logic.

Primarily utilized in binary and multi-class categorization, the NaΓ―ve Bayes classifier is exceptionally effective in text classification scenarios, often exceeding the performance of more complex algorithms. However, its assumption of mutual exclusivity among attributes can sometimes reduce its accuracy, particularly when features are correlated. Moreover, the model struggles with continuous data, typically requiring a preliminary conversion into categorical bins, which may cause loss of information and affect p...

Read more...
πŸ”₯4πŸ‘3πŸ‘2
The primary direction of a trend in technical analysis can be identified using a line calculated from Japanese candlestick data. When analyzing market movements, this line adjusts according to the prevailing trend: it approaches the high prices of each candle during an uptrend, and moves closer to the low prices in a downtrend. This methodology is particularly useful for constructing various moving averages and serves as a robust foundation for the development of additional technical indicators. Such tools are essential for traders aiming to gauge market dynamics and make informed decisions.

Read more...
πŸ‘10❀3πŸ‘1