Discussing the article: "Neural Networks in Trading: Market Analysis Using a Pattern Transformer"

 

Check out the new article: Neural Networks in Trading: Market Analysis Using a Pattern Transformer.

When we use models to analyze the market situation, we mainly focus on the candlestick. However, it has long been known that candlestick patterns can help in predicting future price movements. In this article, we will get acquainted with a method that allows us to integrate both of these approaches.

Over the past decade, deep learning (DL) has achieved significant progress across various fields, and these advancements have attracted the attention of researchers in financial markets. Inspired by the success of DLs, many aim to apply it to market trend forecasting and the analysis of complex data interrelationships. A key aspect of such analysis is the representation format of the raw data, which should preserve the inherent relationships and structure of the analyzed instruments. Most existing models operate with homogeneous graphs, limiting their ability to capture the rich semantic information associated with market patterns. Similar to the use of N-grams in natural language processing, frequently occurring market patterns can be leveraged to more precisely identify interconnections and forecast trends.

To address this problem, we decided to adopt certain approaches from the field of chemical element analysis. Much like market patterns, motifs (meaningful subgraphs) frequently occur in molecular structures and can be used to reveal molecular properties. Let's explore the Molformer framework, introduced in the paper "Molformer: Motif-based Transformer on 3D Heterogeneous Molecular Graphs".

The authors of the Molformer method define a novel heterogeneous molecular graph (HMG) as the model's input, comprising nodes at both the atomic and motif levels. This design provides a clean interface for integrating nodes of different levels and prevents the propagation of errors caused by improper semantic segmentation of atoms. Regarding motifs, the authors employ different strategies for different molecule types. For small molecules, the motif vocabulary is determined by functional groups, grounded in chemical domain knowledge. For proteins, composed of sequential amino acids, a reinforcement learning (RL)-based method for intelligent motif mining is introduced to identify the most significant amino acid subsequences.


Author: Dmitriy Gizlyk

 

Good day, I can't get orders placed by the test.mq5 Expert Advisor.

if(temp[0] >= temp[3])
     {
      temp[0] -= temp[3];
      temp[3] = 0;
     }
   else
     {
      temp[3] -= temp[0];
      temp[0] = 0;
     }
//--- buy control
   if(temp[0] < min_lot || (temp[1] * MaxTP * Symb.Point()) <= 2 * stops || (temp[2] * MaxSL * Symb.Point()) <= stops)
     {
     ...
     }
   else
     {
      ...
     }
//--- sell control
   if(temp[3] < min_lot || (temp[4] * MaxTP * Symb.Point()) <= 2 * stops || (temp[5] * MaxSL * Symb.Point()) <= stops)
     {
...
     }
   else...

The thing is that the array elements temp[0] and temp[3] are always less than min_lot, where can my mistake be?