Software products from Piligrimm - page 4

 

to Piligrim

Thank you!
You have explained it very well.
Enough to implement your methods programmatically.

 

As an example of using indicators to create trading systems, I will give, in a simplified version, a strategy that I implemented in the neural network trading system described in the " Example of building a trading system " section .After the weekend I will start debugging this trading system, and after it is finished I will post it in this thread as an example of using indicators. In the trading system, written by , I used several indicators. As an example, I will give the strategy based only on two of them, "Kristi_GrafModelWav", "Indicator Trend". But first I will say a few words about the principles of these indicators.

"Kristi_GrafModelWav" - built on the basis of polynomials of the following form:

GR1[i][0] = 0.6*(0.5*(-0.00000808108 +1.64312*(SD[i+5][4]-SD[i][4]) -0.387988*(SD[i][1]-SD[i][2]) +0.598535*(SD[i][2]-SD[i][3])

-0.468099*(SD[i+1][3]-SD[i][2])-0.461584*(SD[i+1][4]-SD[i][1])+SD[i][3])+0.5*((SD[i+2][1]-SD[i][3])-(SD[i+3][1]

-SD[i][4])+0.00000000861016*(SD[i][2]-SD[i][3])+(SD[i+19][3]-SD[i][4])+0.3*SD[i][3]+0.7*SD[i][4]))+0.4*((SD[i][1]

-SD[i+10][3])-(SD[i][1]-SD[i+10][4])+0.00000000861016*(SD[i][2]-SD[i+10][3])+(SD[i][3]-SD[i+10][4])+SD[i][4]);.

SDsignals are obtained using the "sliding window" principle that scans the quote history to a given depth and changes its width. Training of polynomials was performed on signals obtained on the basis ofEURUSD quotes history M1. SDsignals were passed through a group of wavelet transforms tuned according to different parameters. Training was done using linear regression algorithms and formalized neural networks reduced to the form of polynomials. The purpose of training polynomials was to increase informativeness of an input signal by inclusion of delayed arguments from the past history and filtration of minor and interfering factors. One more purpose of training polynomials, is to create a group of signals synthesized on the basis of quotes, carrying the child features of the main signal, and overlapping the spectrum of its possible changes. This is done to ensure that the neural networks that will input this group of signals will have an opportunity to "catch" different harmonics included in the input signal and undergo qualitative training. Although training was carried out on EURUSD M1, the indicator works on any instrument, any period, any market. The indicator forms a group of 40 synthesized signals.

"Indicator Trend uses in the basis of its work the algorithm of threshold sampling, developed by me, with the step being reconstructed in proportion to the dynamics of changes in the quotes. As a result of such sampling samples corresponding only to extreme points of the signal are obtained, the signal is compressed, deep filtration is performed due to elimination of noises and insignificant fluctuations. The signal reconstruction on each bar is carried out by interpolation between two adjacent sampling points. In the above pictures, the red line, you can see the reconstructed signal on each bar, and the break points correspond to the sampling points. The "Indicator Power" and "Indicator Channel" indicators are built on the same principle . Such compression of the signal allows obtaining a deep study of the quotes history with a relatively small number of sampling points, which significantly reduces the time and increases the accuracy of neural network training when discrete samples are fed to the input.

The essence of the strategy of building a trading system based on two indicators is as follows. Indicator "Kristi_GrafModelWav" is used as a source of input signals, and the indicator "Indicator Trend" is used as a source signal for training the neural network. The purpose of training is to make a forecast of the future sampling point, which will determine the direction of price movement and its approximate level. To synchronize these indicators, let's set the same length of the input sample LengthSample . In indicators settings, let's set the permission for saving data to disk with indexing direction from the beginning of the array. In "Indicator Trend" indicator settings let's set the mode of saving discrete samples, then price levels in discrete points (breakpoints in the picture) and ordinal number of the sample LengthSample will be written to the disk , let's set the static mode of indicator's operation. At that, at coming of each new bar the whole history will be recalculated and an array will be formed covering the whole length of the sample LengthSample. In the array, created by the indicator "Indicator Trend", we received counts that will be used as data with regards to which the neural network will be trained. Now we should form an array that will be fed to the input of the neural network. Indicator "Kristi_GrafModelWav" writes on the disk an array consisting of 40 columns that correspond to its output signals, and with the length LengthSample. We need to select from this array the rows corresponding to the sampling points of the "Indicator Trend" indicator . This can easily be done using the array obtained from the "Indicator Trend" indicator , its second column contains the ordinal numbers of samples of the sampling points. Since the length of the input sample for both of these indicators is the same, these numbers will correspond to the array of the indicator "Kristi_GrafModelWav", by selecting the appropriate lines of the indicator "Kristi_GrafModelWav" we will perform the sampling of indicator "Kristi_GrafModelWav" data synchronous to the indicator "Indicator Trend". Thus, we obtained the input array for training the neural network. Now we are going to train the neural network. We now need to use the trained neural network to perform calculations and make forecasts in real time. To do this , set LengthSample = 1 in the "Kristi_GrafModelWav" indicator settings . At the arrival of each new bar an array will be written to disk consisting of a single line containing all 40 values of the signal. We should calculate the neural network at the moments of formation of a new discretization point of the "Indicator Trend" indicator according to the learning algorithm. To determine these moments we just need to use two global variables, which are formed by the "Indicator Trend" indicator. As soon as the values of these two global variables change relatively to each other, it means that a new sampling point has been formed. At this point we should read out the data array of the indicator "Kristi_GrafModelWav" from the disk , feed it to the input of the trained neural network and perform the calculation. We will get a forecast of the next sampling point at the moment when the last one was formed. That's a trading system strategy based on the indicators I suggested in its simplest form. You can build more complex strategies using all indicators, it will increase accuracy and reliability of predictions.

 

For a better idea of the functionality of the indicators, here are the instructions for using the "Indicator Trend" indicator as an example. If there are any comments, suggestions for correction or addition, I will gladly listen to them. If you are interested, I can also provide instructions for using other indicators.

=======================================================================================================

Indicator Trend Indicator.

This indicator "Indicator Trend " is intended for creation of a trend model for the instrument to which the indicator is attached. "Indicator Trend " uses in the basis of its work my developed algorithm of threshold sampling with rebuildable step in proportion to dynamics of changing of quotations. As a result of such sampling samples corresponding only to extreme points of the signal are obtained, the signal is compressed, and deep filtration is performed by removing noise and insignificant fluctuations. The signal at each bar is reconstructed by interpolation between two adjacent sampling points.

The indicator works on any instrument, any period, any market. The indicator can be used to design mechanical trading systems, and for manual trading.

The indicator processes data on the arrival of the new bar. The indicator works in two modes, static and dynamic. In the static mode, the indicator builds a trend model for the entire length of the specified history sample and recalculates its entire length on the arrival of a new bar, creating templates of a specified length, which can be displayed on the chart and saved to disk. In the dynamic mode, the indicator calculates the value only for the newly received bar, gradually accumulating the calculated values as new data arrives. The length of the processed history is determined by the "LengthSample" variable in the "Properties - Input parameters" tab, the history length can be any.

Saving of signal values, calculated by the indicator to disk, with corresponding permissions in settings, is possible in two variants:

1). Saving of signal values on each bar;

2). Saving values only sampling points (trend break).

The signal values in the last two sampling points are also saved in the global variables, the names of the global variables can be changed, it allows you to set any number of indicators with different threshold levels for one instrument and through the global variables to organize communication with the Expert Advisor or other indicators. When the indicator works, it is possible to optimize its parameters by rebuilding the threshold ratio. The choice of a specific threshold value is determined by on which instrument and timeframe the indicator is installed as well as which trading strategy you want to implement on the basis of this indicator.

The calculation is visualised on the chart of the instrument in the window where the indicator is installed.

The operation parameters are set in the "Properties - Input Parameters" tab when installing the indicator on a chart in the MetaTrader 4 window.


The "Indicator Trend" indicator has the following input parameters:

1). LengthSample - length of the processed history;

2). Threshold - threshold coefficient;

3). DynamicMode - mode of indicator dynamic/static.

4). SaveFileData - flag to allow writing data calculated by the indicator to disk;

5). FileNameData - file name for saving data;

6). SaveFilePointsFracture - flag to allow writing the sample points calculated by the indicator to disk;

7). FileNamePointsFracture - file name for saving the sample points;

8). Subscripting_MT4 - direction of indexing of arrays to be written to disk.

9). NameGlobalVariable0 - name of the global variable saving the value of the last sample point;

10). NameGlobalVariable1 - name of the global variable saving the value of the penultimate point of sampling.


1). The length of the processed history is determined by the "LengthSample" variable. The maximum size is not limited. At the same time, it's necessary that in the window and in the history of the symbols, with which the indicator works, there is not less number of bars, than "LengthSample + 1".

2). Threshold Factor, sets the sampling threshold in "points".

3). DynamicMode is a flag that determines the choice of dynamic or static mode of operation of the indicator, if DynamicMode = 1 - dynamic mode, if DynamicMode = 0 - static mode. The dynamic mode allows you to speed up the work of the indicator, because only new bars will be processed instead of recalculating the whole history. At the same time, calculated values will be accumulated. Only the data accumulated as a result of calculation will be saved in the file and displayed in the chart, as well as if the writing to disk is enabled. In the static mode, when a new bar comes, the entire history will be recalculated by the depth of "LengthSample". The full length of the processed history will be saved to the file and displayed on the chart, and when writing to disk is enabled.

4). The SaveFileData flag prohibits writing data calculated by the indicator to disk when the value is 0, if further data processing is not required. If further processing and saving data to disk is necessary, SaveFileData should be set to 1.

5). FileNameData - name of file in which data will be saved on disk. You can use any name, but the file extension must remain unchanged.csv, otherwise an error will occur when writing the file. Maximum size of saved array is determined by "LengthSample", but number of lines in it may be less than "LengthSample", by number of bars separating last sampling point from zero bar.

6). The SaveFilePointsFracture flag prohibits writing prices in sampling points calculated by the indicator to disk when the value is 0, if further data processing is not necessary. If the subsequent data processing and saving to disk is necessary, the SaveFilePointsFracture value should be set to 1.

7). FileNamePointsFracture - the name of the file where the values of prices in sampling points will be saved and the serial number of the bar from the beginning of the processed history "LengthSample", corresponding to each sampling point. The number of records in this file will be determined by the number of sampling points obtained on the history length equal to "LengthSample" at the set threshold ratio. In the dynamic mode - the number of sampling points formed since the start of the indicator. The serial number of the bar, corresponding to each sampling point will also be calculated from the moment of the indicator start.

8). The variable Subscripting_MT4 - defines the direction of indexing of the array being written to the disk, if we set it to 1, the indexing will correspond to the one used in MetaTrader 4, from the leading position to the zero, if we set it to 0, the standard indexing will be from zero to the leading position. It refers to both FileNameData and FileNamePointsFracture.

9). NameGlobalVariable0 - Name of the global variable that stores the price value in the last sampling point.

10). NameGlobalVariable1 - the name of the global variable saving the price value in the penultimate sampling point.


When the indicator works, the upper left corner of the chart will display the information about the length of the processed history "LengthSample", the Threshold value and the number of cycles worked by the indicator "AmountRunning".


Unpack all the contents of the archive Indicator Trend.rar and install Indicator Trend.ex4 indicator to the folder \experts/indicators, restart MetaTrader 4 terminal, after that indicator "Indicator Trend" appears in the window of custom indicators \Navigator/Indicators/User Indicators, it can be installed on the chart in MetaTrader 4 window.

 

If there are no questions about the above instructions for the operation of indicator "Indicator Trend", I will not give instructions for other indicators, but will only give excerpts regarding the principle of their work. For indicators Kristi_GrafModelWav,"Indicator Trend", I've done it in the example of trading strategy, I will give for "Indicator Power" and "Indicator Channel" .

=====================================================================================================

Indicator Power" indicator.

The idea, on the basis of which "Indicator Power" indicator was developed , is to dynamically trace the struggle of bullish and bearish trend, which takes place in the market at the moment. If the bullish trend is dominating, when new bars arrive, the indicator rises on the zero bar proportionally to the strength of the trend, when the bearish trend is dominating - respectively down. If the tendency oscillates slightly to one or another side, the indicator values show a straight line, which moves slowly along its length from the last break point in proportion to the strength of the prevailing trend, and with a significant increase of one of the trends it jumps to the corresponding side, forming a new break point. " Indicator Power " - uses in the basis of its operation the algorithm of threshold sampling, developed by me, with the step being reconstructed in proportion to dynamics of changes in quotations. As a result of this sampling we get readings that correspond only to the extremes of the signal. The signal level, shown by the indicator, is determined by the strength of the dominant trend at the moment, and changes slowly in proportion to the strength of the trend, until the next sampling point is formed and fixes this level.

Indicator Channel" indicator.

There are two trends on the market, the uptrend is bullish, and the downtrend is bearish. These trends have different character, but nevertheless they are dependent on each other, and influence each other. This indicator is based on the idea to separate these two trends from the general data flow of quotes, formalize them in a time series, reflecting their development and mutual influence, as well as the result of their struggle. Indicator "Indicator Channel" creates a trend channel and reflects the dynamics of its behaviour, extrapolating the direction of market trends. The upper line shows the character of a bullish trend under the influence of a bearish one, the lower line shows the character of a bearish trend under the influence of a bullish one, the middle line is the result of their struggle, and actually is one of the trend harmonics corresponding to the specified level of quotes flow sampling. Different level of sampling allows to separate harmonics with different amplitude-frequency characteristics. "Indicator Channel " - uses in the basis of its work my developed threshold sampling algorithm with a reconstructed step in proportion to the dynamics of changes in quotations. As a result of such sampling we get the samples corresponding to the extreme points of the signal for each trend separately. The signal level, for each of three lines of the indicator, is determined by the dynamics of the corresponding trend and changes slowly in proportion to the strength of the trend, and the nature of the prevalence of one over the other, until the next discretization point is formed and fixes this level.

Informative components of the indicator are: narrowing and widening of the channel, angles of upper and lower rays divergence, inflection points and the moments of channel central line reversal. When new bars are received, the indicator dynamically reflects the changing market trend, rebuilding the rays from the last break point to the first bar.

 

I think that the price you set is way too high, because it's almost comparable to the well-known software products, that can be your developments are great, but we only know about it from your words.But if the indicators offered for purchase are written in the same spirit, the construction of an Expert Advisor based on them, which in my opinion requires a large number of experiments, probably requires at least an "Elbrus" computer :)).If I had tried to use an elementary Expert Advisor based on it, I had to give it up because I was struggling to optimize my not so weak PC.

 
lovova:

I think that the price you set is way too high, because it's almost comparable to the well-known software products, that can be your developments are great, but we only know about it from your words.But if the indicators offered for purchase are written in the same spirit, the construction of an Expert Advisor based on them, which in my opinion requires a large number of experiments, probably requires at least an "Elbrus" computer :)).I tried to use simple Expert Advisor based on it, but I gave up because my not too weak computer could hardly pant, and to test the entire story you know, and optimization.

Thanks for the pebble. I have a pricing standard for trading software products. I appreciate the effort I put into it, and I think the prices I set are appropriate for the content. As it should be clear from what I have written about indicators, they are not of primitive type, and although the code is optimized and not very big, the algorithm of their work is rather complicated, I spent several years to bring them up to date. If we compare them with good level Expert Advisors, for example, the prices are comparable, and it is much easier to write an Expert Advisor where the majority of standard blocks are occupied, than to create an effective algorithm of market analysis. I don't have a "name" yet, but judging from this article and several topics in which I've participated, I'm not a stranger to this industry, and I have some experience. I'm not saying that these indicators should be bought together, I'm saying that they were developed as complementary tools for multifaceted analysis of different market algorithms and are most effective when used together. But they can work separately or in pairs, as shown in the example. As for guarantees, this is a separate issue, I can guarantee that their work as I wrote, but whether you will make a profit using them depends on the strategy you will build on them, and if you think you need to discuss the strategy with me, so I can recommend something, having a better idea of the Indicators possibilities. If there are any problems and difficulties in mastering their work, I will of course provide technical support.

What I am proposing now cannot be compared to Krisity indicator, I started to write it to master MQL, it's the first code that I wrote in a language that is new to me. I didn't know the possibilities of the language and functions yet, and I didn't set the task to write it optimally, I was just learning. Of course, everything looked and worked differently now.

 

I get emails asking me to send me demo versions of the indicators to see how they work. Unfortunately, I do not have any demo versions. To compensate it partially, to give an idea of how 3 indicators - "Indicator Trend", "Indicator Power" and "Indicator Channel" work in dynamics, I decided to demonstrate their work in the form of slides taken from the demo terminal during several days. Not to overload the topic with images, I will show only the slides reflecting any changes in the market situation and change of indicator values. The time difference between the terminal and the forum is 2 hours. First picture:

 

Second slide, I increased the threshold of the "Indicator Trend" indicator slightly, it's better, I won't adjust anything else.

 
Reason: