Sultonov differential indicator - page 24

 
Artyom Trishkin:
39th circle?
Programmers please join the discussion, point out my mistake and suggest the right way to solve the problem.
 
Yousufkhodja Sultonov:
I'm asking programmers to join the discussion, point out my mistake and suggest the right way to solve the problem.

Most of this thread has been telling you this error. And it is not an error in the indicator, but an error in the logic of its calculation - in your case.

 
Artyom Trishkin:

Throughout most of this thread this error is told to you. And it is not an error in the indicator, but an error in the logic of its calculation.

Here, the indicator was working for a long time, showing the chart, stating that, the market is under Bulls:

Called the indicator and pressed OK, there is a slight change:

That's what I'm talking about, otherwise, the indicator works fine. Just, the red line has gone down a little bit in relation to the red line. That's all, no other differences. I only need to understand the mutual positioning, my calculations have nothing to do with it. There seems to be another problem here.

 
Yousufkhodja Sultonov:

Here, the indicator has been working for a long time, showing the chart, stating that, the market is run by the Bulls:

Called the indicator and pressed OK, there is a slight change:

That's what I'm talking about, otherwise, the indicator works fine. Just, the red line has gone down a little bit in relation to the red line. That's all, no other differences. I only need to understand the mutual positioning, my calculations have nothing to do with it. There seems to be another problem here.

The problem is the new reference point. New point = new sum = new lines. Your changes occur smoothly because the amount of data to be calculated is quite large - 1000. A change at the beginning of the calculation by a few bars over a thousand already gives a noticeable distortion. And if you calculate for 10 bars? The indicator will quickly redraw itself.

 
Artyom Trishkin:

The problem is the new reference point. New point = new sum = new lines. Your changes occur smoothly because the amount of data to be calculated is quite large - 1000. A change at the beginning of the calculation by a few bars over a thousand already gives a noticeable distortion. And if you calculate for 10 bars? The indicator will quickly redraw itself.

I agree with the version of the starting point, but, there is no change in the lines themselves. And the EA will work on calculation results on the 0th bar, which is always the same, no matter when you run the indicator. The Expert Advisor does not work with lines, it works with the fact of crossing on the 0-th bar. If there are 10 bars, the same thing will happen on the 0th bar.
 
Yousufkhodja Sultonov:
I agree with the version of the reference point, but the lines themselves have not changed. And the EA will work by results of calculations on the 0 bar, which are the same every time, no matter when you start the indicator. The Expert Advisor does not work with the lines, it works on the fact of crossing on the 0-bar.

As soon as you switch back and forth between the timeframes on which the Expert Advisor is working, it starts getting different data from what it was getting before. Is it normal?

 
Artyom Trishkin:

As soon as you switch back and forth between the timeframes on which the Expert Advisor is working, it starts getting different data from what it was getting before. Is this normal?

And why should we switch TFs, especially if we set the Expert Advisor on VPP and do not touch it? Even if we switch the TF, the calculation result on the 0-bar will not be different after we return to the native TF.
 
If the calculation methodology does not allow to make the lines static in time, and only the current indicator readings matter (at 0 bar), can we make the indication not by lines? It may not be so visual, but it won't be misleading... You don't need lines to attach them to the Expert Advisor.
 
Сергей:
If the calculation methodology does not allow to make the lines static in time, and only the current indicator readings matter (at 0 bar), can we make the indication not by lines? It may not be so visual, but it won't be misleading... You don't need lines to attach them to your EA.
Right, but what is your idea of"not using lines for indication?". We came to the conclusion that in order to see the true market condition, corresponding to N periods, we should programmatically restart the indicator on every new bar, to exclude the reference point influence and recognize the indicator as overdrawing. This doesn't make the indicator hot or cold, it still performs its calculations and pronounces its verdict on the results of the 0-th bar, using the historical data within the specified period. I am prepared for this turn of events to recognise and accept this approach. It is quite another matter, if the fact of line crossing for profitable trading will not be enough, and we will have to analyze the behavior and direction of these lines and estimate them, for example, by regression in order to predict the moment of crossing. But this is forecasting, and the indicator, for now, works in the "here and now" mode. What mode is better - will show real tests of the Expert Advisor with the attached indicator.
 
Yousufkhodja Sultonov:
Right, but how do you imagine"make the indication not lines?". We came to the conclusion that in order to see the true market condition, corresponding to N periods, we should programmatically restart the indicator on every new bar, to exclude the reference point influence and recognize the indicator as re-drawing. This doesn't make the indicator hot or cold, it still performs its calculations and pronounces its verdict on the results of the 0-th bar, using the historical data within the specified period. I am prepared for this turn of events to recognise and accept this approach.

so at every tick the indicator will recalculate the entire 1000 bar window?

if yes, then it is a very bad option.

Reason: