In programming, logging neatly organized, formatted information can grant higher efficiency. StringFormat() function can be quite handy in such cases. It helps to format data, displaying it in the terminal journal and further using it in the program.
Creating templates for displaying symbol properties in the journal can involve two functions. The first one formats the string into the form required for printing, and the second one prints the string received by the first into the journal. This approach ensures uniform formatting.
Various properties have been explained in detail, ranging from data latency, economic sector, price for building bars, spread, Bid price, to Ask price. The focus has been on creating two functions for each property for a comprehensive understanding. Various examples have been included for every symbol property to ensure clear understanding for the user. Sub...
Read More
Creating templates for displaying symbol properties in the journal can involve two functions. The first one formats the string into the form required for printing, and the second one prints the string received by the first into the journal. This approach ensures uniform formatting.
Various properties have been explained in detail, ranging from data latency, economic sector, price for building bars, spread, Bid price, to Ask price. The focus has been on creating two functions for each property for a comprehensive understanding. Various examples have been included for every symbol property to ensure clear understanding for the user. Sub...
Read More
π4
Understanding the official documentation of code and functions can be daunting, therefore, there is now an initiative to simplify these codes for better comprehension and reusability. No matter the level of coding expertise, from beginners to those who want to evolve quickly, these simplified versions should be of assistance.
Opinions are sought on the user experience of the basic codes provided compared to those provided in the official documentation. Engagement with these codes, through comments and rating, is encouraged to enhance their visibility.
There is a host of codes available, specifically geared towards beginners, in the Mql5 iFunctions. These include ADX, Alligator, AMA - Adaptive Moving Average, ATR - Average True Range, Bands Bollinger, Ichimoku, MACDr, Momentum, Moving Average, RSI, and Stochastic.
For those looking for a bit more advancement in their coding, two ...
Read More
Opinions are sought on the user experience of the basic codes provided compared to those provided in the official documentation. Engagement with these codes, through comments and rating, is encouraged to enhance their visibility.
There is a host of codes available, specifically geared towards beginners, in the Mql5 iFunctions. These include ADX, Alligator, AMA - Adaptive Moving Average, ATR - Average True Range, Bands Bollinger, Ichimoku, MACDr, Momentum, Moving Average, RSI, and Stochastic.
For those looking for a bit more advancement in their coding, two ...
Read More
π5
Discrete Hartley Transform (DHT), first proposed in 1942 by Ralph Hartley, had a discrete version introduced in 1983 by Ronald Bracewell. DHT is used in signal analysis and processing of discrete time series - it converts signals from the time domain to the frequency domain, using real numbers only. This makes its application results more visually comprehensible and convenient for practical implementation.
This transformative technique allows the evaluation of the influence of specific harmonic in the original signal. Moreover, the Inverse Hartley transform aids in shifting from the frequency domain back to the time realm.
The practical usability of DHT is exemplified by taking the spectrum of Open prices as a signal, applying the inverse Hartley transform to an altered signal, or using it for signal smoothing. Furthermore, spectrum processing can involve nullifying or attenuating...
Read More
This transformative technique allows the evaluation of the influence of specific harmonic in the original signal. Moreover, the Inverse Hartley transform aids in shifting from the frequency domain back to the time realm.
The practical usability of DHT is exemplified by taking the spectrum of Open prices as a signal, applying the inverse Hartley transform to an altered signal, or using it for signal smoothing. Furthermore, spectrum processing can involve nullifying or attenuating...
Read More
π5
Examine the practical details of economically deploying large language models (LLMs) locally, fine-tuned to specific needs. This discourse covers essential aspects, including hardware and software configurations, to build a basic deployment environment for LLMs. Grasp the requirements for deploying these fundamental models that apply deep learning to natural language processing and natural language generation tasks.
Understand why LLMs are a preferred choice for algorithmic trading due to their strong logical comprehension and reasoning capabilities. The article also discusses the benefits of local deployments, such as data protection, optimized performance, personalized data fine-tuning, and real-time response.
Considerations for hardware configuration include CPU, GPU, memory, and storage devices that ensure efficient model performance. The software environment configuration reve...
Read More
Understand why LLMs are a preferred choice for algorithmic trading due to their strong logical comprehension and reasoning capabilities. The article also discusses the benefits of local deployments, such as data protection, optimized performance, personalized data fine-tuning, and real-time response.
Considerations for hardware configuration include CPU, GPU, memory, and storage devices that ensure efficient model performance. The software environment configuration reve...
Read More
π7
Lessons from an experienced developer:
Achieving efficient programming in financial markets goes beyond the elementary mastery of codes - it's about getting the full grasp of the essence of time. With the MQL5 (MetaQuotes Language 5), significant strides in handling date and time in financial trading has been actualized.
This knowledge is a weapon for both traders and developers, and today, the focus would be on highlighting the comprehensive scope of this important subject. Key topics include: datetime type, MqlDateTime structure, OnTimer event, and potential applications such as NewBar, Time Filter, and tradeAtTime.
The datetime variable type, fundamental to MQL5, helps comprehend Unix time i.e., seconds elapsed since January 1, 1970. From comparisons and manipulations to conversions, a deep understanding of datetime opens up limitless possibilities in the trading arena.
Ensui...
Read More
Achieving efficient programming in financial markets goes beyond the elementary mastery of codes - it's about getting the full grasp of the essence of time. With the MQL5 (MetaQuotes Language 5), significant strides in handling date and time in financial trading has been actualized.
This knowledge is a weapon for both traders and developers, and today, the focus would be on highlighting the comprehensive scope of this important subject. Key topics include: datetime type, MqlDateTime structure, OnTimer event, and potential applications such as NewBar, Time Filter, and tradeAtTime.
The datetime variable type, fundamental to MQL5, helps comprehend Unix time i.e., seconds elapsed since January 1, 1970. From comparisons and manipulations to conversions, a deep understanding of datetime opens up limitless possibilities in the trading arena.
Ensui...
Read More
π4π3β€1
Delving into the complex world of coding can be demanding, especially for beginners. For those seeking examples of codes and functions, they can be found within the official documentation. Simplified versions of codes have been crafted for ease of use and rapid progression - crucial tools for beginners and seasoned programmers looking to refine their skills.
Educational codes provided cover a wide variety of topics, ranging from the basics to more advanced concepts. For instance, beginners can learn about the codes of Adaptive Moving Average or Average True Range. This knowledge base also includes topics like Bands Bollinger, Ichimoku, and Momentum. Advanced users can further their understanding with codes illustrating calculations for specific indicators without using the Mql5 iFunction.
The aim is efficient reusability and a learning journey that is as smooth as possible. Program...
Read More
Educational codes provided cover a wide variety of topics, ranging from the basics to more advanced concepts. For instance, beginners can learn about the codes of Adaptive Moving Average or Average True Range. This knowledge base also includes topics like Bands Bollinger, Ichimoku, and Momentum. Advanced users can further their understanding with codes illustrating calculations for specific indicators without using the Mql5 iFunction.
The aim is efficient reusability and a learning journey that is as smooth as possible. Program...
Read More
π6π€1
Recently, attention has turned towards the potential involvement of category theory & natural transformations in the Generative Pretrained Transformer (GPT) algorithms deployed by Open AI, particularly chatGPT. The speculation stems from the 'transform' in transformer neural networks, which have demonstrated impressive capabilities in tasks such as language translations.
The Transformer model, as presented in 'Attention Is All You Need,β proposed Self-Attention as a revolutionary approach. It's important to note that the AI platforms currently in use owe a significant portion of their genesis to this development.
While the exact algorithm used by Open AI remains undisclosed, the understanding is that it employs Word-Embedding, Positional Encoding, Self-Attention, and a Feed-Forward network. Concerning language translation, which is crucial considering most input in chatGPT is te...
Read more...
The Transformer model, as presented in 'Attention Is All You Need,β proposed Self-Attention as a revolutionary approach. It's important to note that the AI platforms currently in use owe a significant portion of their genesis to this development.
While the exact algorithm used by Open AI remains undisclosed, the understanding is that it employs Word-Embedding, Positional Encoding, Self-Attention, and a Feed-Forward network. Concerning language translation, which is crucial considering most input in chatGPT is te...
Read more...
π2
Get acquainted with the winning strategy Expert Advisor (EA) which is grounded on the Super Scalper EMAs indicator. This algorithmic trading tool offers maximum profit potential with minimal risk involved. Its robust design ensures that the strategies are executed with precision and speed, leaving little to chance during operational hours. Take the guesswork out of intensive market speculation and exercise a high level of control over trading activities. Ideal for seasoned traders and beginners alike, this EA paves the way for more efficient, streamlined trading processes.
Moreover, this EA is equipped with mechanisms that minimize exposure to unanticipated market fluctuations. The unique intersection of low risk, high-profit promise might seem elusive in the volatile realms of Forex trading, but with this EA - gaining a competitive edge is anything but out of reach. Balance risk an...
Read more...
Moreover, this EA is equipped with mechanisms that minimize exposure to unanticipated market fluctuations. The unique intersection of low risk, high-profit promise might seem elusive in the volatile realms of Forex trading, but with this EA - gaining a competitive edge is anything but out of reach. Balance risk an...
Read more...
π3π2
In a recent exploration of MQTT, a versatile pub/sub messaging protocol, it was discovered that MQTT is beneficial across various industries where an agnostic message-sharing protocol is needed. The protocol also proved useful in the context of trading applications.
Upon embarking on the challenge of integrating a native MQL5 client for MQTT into the code base and utilizing Mosquitto open-source MQTT broker running on WSL, some initial hurdles arose. An attempt to connect with a local Mosquitto broker received an immediate reset due to Protocol Error.
However, following a Test-Driven Development approach, a connect packet builder was constructed considering various metadata, which cleared this error. This method of development, which entails writing a test prior to developing the code, can be beneficial for aligning with project requirements and setting clear development goals.
...
Read more...
Upon embarking on the challenge of integrating a native MQL5 client for MQTT into the code base and utilizing Mosquitto open-source MQTT broker running on WSL, some initial hurdles arose. An attempt to connect with a local Mosquitto broker received an immediate reset due to Protocol Error.
However, following a Test-Driven Development approach, a connect packet builder was constructed considering various metadata, which cleared this error. This method of development, which entails writing a test prior to developing the code, can be beneficial for aligning with project requirements and setting clear development goals.
...
Read more...
π2
In order to enhance comprehension and make the best use of the submitted codes, certain guidelines need to be adhered to. Recognising the underlying principles upon which the code is built and interpreting the indications is vital for precise understanding.
If submitting an Expert Advisor, it would be beneficial to mention a suitable symbol and timeframe. Should the submission be an include file, its purpose needs to be articulated, such as its use in trailing, or calculating the size of a position to be opened.
Images incorporated must be of a small size, preferably not exceeding 750x500 pixels. Charts with indicators or graphical objects should follow a black and white color scheme, allowing easy printing from screen.
Naming the attached code using Latin letters and in English language is essential for uniform understanding. For instance, research.mq5 is preferable over issledo...
Read more...
If submitting an Expert Advisor, it would be beneficial to mention a suitable symbol and timeframe. Should the submission be an include file, its purpose needs to be articulated, such as its use in trailing, or calculating the size of a position to be opened.
Images incorporated must be of a small size, preferably not exceeding 750x500 pixels. Charts with indicators or graphical objects should follow a black and white color scheme, allowing easy printing from screen.
Naming the attached code using Latin letters and in English language is essential for uniform understanding. For instance, research.mq5 is preferable over issledo...
Read more...
π2π1
The importance of using Python's massive library for reducing the development cycle in data processing is significant. The availability of vast libraries offered by Python facilitates development while saving developers time. In order to further delve into the subject, Python libraries related to different architectures, trading, and backtesting will be discussed. These include but aren't limited to libraries for labeled data that users can study further.
The convenience of processing data obtained from the MT5 client using the MetaTrader5 library is emphasized. Installation of necessary libraries, creation of Python files, connection to the client, and data acquisition processes are discussed step-by-step. However, careful attention is required in converting the obtained data into a suitable format.
The use of the pytrendseries library is favored due to its advantages in data proc...
Read more...
The convenience of processing data obtained from the MT5 client using the MetaTrader5 library is emphasized. Installation of necessary libraries, creation of Python files, connection to the client, and data acquisition processes are discussed step-by-step. However, careful attention is required in converting the obtained data into a suitable format.
The use of the pytrendseries library is favored due to its advantages in data proc...
Read more...
π4
The week presents an opportunity to comprehend the inner workings of the Rsi() function. Recreating it, developers could gain significant insight into crucial concepts and codes applicable in forthcoming projects.
Key areas to focus on include path limitation within the oncalculate function, FOR loops, and static variables. Further, the exercise imparts knowledge on writing and documenting functions as well as flags.
Additional information can be accessed directly at the following link: https://www.mql5.com/fr/users/william210.
For those with innovative ideas for development, they can be suggested at https://www.mql5.com/en/forum/453288.
Links to beneficial free indicator codes for beginners in Mql5 development have also been provided. These include those for Rsi, MACDr, Momentum, the Moving average, Bands Bollinger, Ichimoku, Adx, and Stochastic functions.
The primary aim is...
Read more...
Key areas to focus on include path limitation within the oncalculate function, FOR loops, and static variables. Further, the exercise imparts knowledge on writing and documenting functions as well as flags.
Additional information can be accessed directly at the following link: https://www.mql5.com/fr/users/william210.
For those with innovative ideas for development, they can be suggested at https://www.mql5.com/en/forum/453288.
Links to beneficial free indicator codes for beginners in Mql5 development have also been provided. These include those for Rsi, MACDr, Momentum, the Moving average, Bands Bollinger, Ichimoku, Adx, and Stochastic functions.
The primary aim is...
Read more...
β€3π₯1
Sifting through and optimizing the Go-Explore algorithm for agent training yields promising results for tackling substantial training periods. In this exploration, the effectiveness of the Go-Explore algorithm in data modeling is considered over a four-month stretch of training data.
Initially, the model is scrutinized for shortcomings. Fixed constant values are adjusted to suit large-scale training periods, and data sorted is excluded due to inefficiency. The collective actions are then constrained on volume to avoid accumulation of negative or positive constructs.
Several additional tools were adopted to further improve and regulate the modelβs performance. For risk control, a maximum limit is implemented on the duration an open position can be held. This regulation protects against outsized losses. To improve the quality of forecasting, the training set is divided into smaller s...
Read more...
Initially, the model is scrutinized for shortcomings. Fixed constant values are adjusted to suit large-scale training periods, and data sorted is excluded due to inefficiency. The collective actions are then constrained on volume to avoid accumulation of negative or positive constructs.
Several additional tools were adopted to further improve and regulate the modelβs performance. For risk control, a maximum limit is implemented on the duration an open position can be held. This regulation protects against outsized losses. To improve the quality of forecasting, the training set is divided into smaller s...
Read more...
π2
In response to the classic MQL4 indicator, a new version with superior features has been developed in MQL5. This variant allows for added customizability and increased precision by offering an adjustable fractals period. This feature is reassuring as the built-in fractal indicator resorts to using period 5.
Additionally, specification of prices for high and low can be chosen to allow for enhanced convenience in extreme market conditions. The use of such feature can demonstrate its worth in instances such as a turbulent whipsaw market scenario.
From a mathematical perspective, the method employed for fractal calculations is significant as it doesn't restrict fractal up and fractal down at the same bar. This approach is deemed right and can eliminate any bias that doesn't have a mathematical basis. Limiting such calculations to just one fractal per bar might introduce a bias unwarra...
Read more...
Additionally, specification of prices for high and low can be chosen to allow for enhanced convenience in extreme market conditions. The use of such feature can demonstrate its worth in instances such as a turbulent whipsaw market scenario.
From a mathematical perspective, the method employed for fractal calculations is significant as it doesn't restrict fractal up and fractal down at the same bar. This approach is deemed right and can eliminate any bias that doesn't have a mathematical basis. Limiting such calculations to just one fractal per bar might introduce a bias unwarra...
Read more...
π΄3π1
A new guide on creating a local LLM (Large Language Model) running environment using Windows+WSL is now available. The guide covers the whole process, from setting up WSL2, a version upgrade from Microsoft's Windows Subsystem for Linux (WSL), to training AI with Linux tools in a Windows environment.
The article hints at the efficiency of WSL2 - it uses a real Linux kernel, is faster, and does away with the need for dual system setups or Windows+VirtualMachines. Usage of Linux tools in the Windows environment, is also made more convenient.
The guide covers WSL2 installation, detailing requirements and common WSL commands for the software configuration. It provides steps to migrate the subsystem to different disks or partitions if needed, and outlines how to setup configuration files.
For those with NVIDIA's graphics card, the guide takes you through installing NVIDIA CUDA accelerat...
Read more...
The article hints at the efficiency of WSL2 - it uses a real Linux kernel, is faster, and does away with the need for dual system setups or Windows+VirtualMachines. Usage of Linux tools in the Windows environment, is also made more convenient.
The guide covers WSL2 installation, detailing requirements and common WSL commands for the software configuration. It provides steps to migrate the subsystem to different disks or partitions if needed, and outlines how to setup configuration files.
For those with NVIDIA's graphics card, the guide takes you through installing NVIDIA CUDA accelerat...
Read more...
π2
The application of hierarchical reinforcement learning in trading proposes a hierarchical model capable of optimal decision making across variable market conditions. The suggested model utilizes global-level and local-level reinforcement learning which broadens the decision-making architecture and effective knowledge utilization. The advantages of hierarchical models in trading spans from adaptability, efficiency, resource allocation, and stability to interpretability of results.
Adapting a hierarchical model allows for comprehensive market condition analysis, taking into consideration macroeconomic factors like political events or economic indicators. A lower level analysis takes into note factors such as technical analysis and other asset-specific information to generate informed decisions and adapt to varying market situations.
Hierarchical models can efficiently use all availab...
Read more...
Adapting a hierarchical model allows for comprehensive market condition analysis, taking into consideration macroeconomic factors like political events or economic indicators. A lower level analysis takes into note factors such as technical analysis and other asset-specific information to generate informed decisions and adapt to varying market situations.
Hierarchical models can efficiently use all availab...
Read more...
π2
The recently implemented Hull MA now features four customizable input parameters: InpHmaPeriod of 20, InpColorKind (single_color), InpColorIndex (color_index_3), and InpMaxHistoryBars of 240, all designed function in a self-explanatory manner.
Central to the user experience is the ENUM_COLOR_KIND, a pivotal enumeration allowing a switch between single and multi-color modes β defaulting to single color. The multi-color mode brings diversity to the Hull MAβs aesthetics with divergent colors for rising and falling values.
Conversely, in single color mode, the Hull MA's hue is determined by the ENUM_COLOR_INDEX, while in multi-color mode, the default color is grey, changing to green for upslopes and red during downslopes.
The sample images below show these color changes in effect. The carefully crafted code is available for users' access to enable more flexibility in operational use....
Read more...
Central to the user experience is the ENUM_COLOR_KIND, a pivotal enumeration allowing a switch between single and multi-color modes β defaulting to single color. The multi-color mode brings diversity to the Hull MAβs aesthetics with divergent colors for rising and falling values.
Conversely, in single color mode, the Hull MA's hue is determined by the ENUM_COLOR_INDEX, while in multi-color mode, the default color is grey, changing to green for upslopes and red during downslopes.
The sample images below show these color changes in effect. The carefully crafted code is available for users' access to enable more flexibility in operational use....
Read more...
β€3π1
Investigating the issue of model procrastination in reinforcement learning, often a challenge when the learning process stagnates, this article scrutinizes numerous causes and methods to address them. Insufficient training environments, task complexity, and lack of motivation or feedback can all contribute to the issue.
One crucial solution lies in diversifying training data and resources. Simplification of tasks, algorithm optimization, and efficient utilization of resources also prove decisive in remedying the situation. Additionally, setting clear goals, bolstering the reward function, and implementing consistent evaluations of the modelβs progress will encourage active participation.
If a model stagnates from lack of updates, establishing regular update cycles based on new data improves the learning progress. Furthermore, creating a stimulating environment with varied tasks enco...
Read more...
One crucial solution lies in diversifying training data and resources. Simplification of tasks, algorithm optimization, and efficient utilization of resources also prove decisive in remedying the situation. Additionally, setting clear goals, bolstering the reward function, and implementing consistent evaluations of the modelβs progress will encourage active participation.
If a model stagnates from lack of updates, establishing regular update cycles based on new data improves the learning progress. Furthermore, creating a stimulating environment with varied tasks enco...
Read more...
πΎ4π2π₯1
Analyzing performance metrics of Expert Advisors (EA) remains a primary concern for developers, especially regarding the propensity of certain tools like MetaTrader 5's Strategy Tester to produce potentially misleading results. The crux of the issue: apparent "trick" EAs can appear to give extraordinarily successful projections which fail to materialize in practice. This phenomenon appears to be due in part to permutation testing, a tool that suggests a more robust view of a strategy's potential outcome.
This approach involves the permutation of price bars, a strategy that strives to maintain the original price series' general trend while ensuring the open or close of a bar stays within the boundaries of the high or low respectively. The spread of price changes must also endure from the open to the close, with bar-to-bar price changes moving in the same distribution as well.
For th...
Read more...
This approach involves the permutation of price bars, a strategy that strives to maintain the original price series' general trend while ensuring the open or close of a bar stays within the boundaries of the high or low respectively. The spread of price changes must also endure from the open to the close, with bar-to-bar price changes moving in the same distribution as well.
For th...
Read more...
π2
Understanding the dynamics of trading can be challenging. High on the list of advanced techniques is analysis through Wick Ratio Candlesticks. This innovative approach differs from conventional models due to focusing on the upper and lower wick ratio, rather than the typical open and close properties.
When an equivalence is found between the upper and lower wick, a 'snow candle' characteristically appears. Alternatively, a plot of a 'bear candleβ manifests if the upper wick surpasses the lower wick, and when the upper wick falls beneath the lower wick, a 'bull candle' is illustrated.
The visual representation also offers customizable aesthetics via indicator settings, allowing for a more tailored approach. Deviation from traditional models offers traders a fresh perspective and additional tools in their arsenal, making this technique an interesting consideration for integration into...
Read more...
When an equivalence is found between the upper and lower wick, a 'snow candle' characteristically appears. Alternatively, a plot of a 'bear candleβ manifests if the upper wick surpasses the lower wick, and when the upper wick falls beneath the lower wick, a 'bull candle' is illustrated.
The visual representation also offers customizable aesthetics via indicator settings, allowing for a more tailored approach. Deviation from traditional models offers traders a fresh perspective and additional tools in their arsenal, making this technique an interesting consideration for integration into...
Read more...
π3πΎ3
Discussions around reinforcement learning have largely revolved around the challenge of defining a reward function to guide an agent's behavior. The problem intensifies when multiple goals or ambiguous situations are involved. There may also be tasks where an explicit reward function seems elusive, limiting the application scope of conventional reinforcement learning methods.
One solution to these hurdles is the "Diversity is All You Need" method. This approach encourages a model to learn a skill without relying on an explicit reward function. By focusing on diversity of actions, maximizing interaction variability with the environment, an agent can be effectively trained. This makes models more flexible and adaptable, helping them deploy different strategies depending on task requirements.
The principle takes another bold step by asserting that an agent's current state depends not o...
Read more...
One solution to these hurdles is the "Diversity is All You Need" method. This approach encourages a model to learn a skill without relying on an explicit reward function. By focusing on diversity of actions, maximizing interaction variability with the environment, an agent can be effectively trained. This makes models more flexible and adaptable, helping them deploy different strategies depending on task requirements.
The principle takes another bold step by asserting that an agent's current state depends not o...
Read more...
π2πΎ1