When does it make sense to keep part of the robot code in an indicator? - page 34

 
TheXpert:

Debunking fallacy #1: you can do without IndicatorCounted()

An indicator with it:

Without it, on the principle of hrenfx

Then we apply the indices to the chart and emulate the loss of connection while the automaton is running. Result:




It's like this. Therefore, I avoid using features that won't be useful later on (when developing an EA).

I don't believe in electricity and prefer to do everything myself. And this function I don't understand.

 
sergeev:


And can you post the research and checks on this conjecture?

Only carried out a few experiments with the connection failing. I didn't do a full analysis of the developers' crap. It was both annoying and long (I had to do it not for a minute or two, but for at least a dozen or two). My version of EA handles brief connection interruptions without any problems. However, research has shown that short-term (for M1) is not hours, but minutes (< 10).

You can fully dig into this topic with simple experiments. I can't claim 100% yet. Perhaps, we should not call an empty indicator at the beginning, but the indicator with call of IndicatorCounted().

I came up with a quick way to investigate: to run several terminals at once (I will need less than five) and on each terminal a different variant of investigation. Cut off communication for an hour and then restore. Get a few different variants at once. From these you will get the right picture.

P.S. You need different terminals, not different charts. It must exclude the variant that IndicatorCounted() is calculated once for all indicators in the terminal.

P.P.S. This very crap has been greatly modified in builds > 380. And, judging by responses, it will be changed many times. So, it is almost meaningless to conduct a study. We must ask developers directly what happens to the indicator (which contains call of IndicatorCounted()) during first tick after a long break of communication.

P.P.P.S. Asked.

 
Integer:


Don't be ridiculous. You just haven't learned how to write indicators yet.

After such heresy:

might as well refrain from having an opinion in this thread at all.


Well, who and what has learned to write, I think, will be seen from outside, as for heresy - the level of your thinking, I think, by all indications, looks like the logic of religious fanatics, with whom it is useless and absolutely unnecessary to argue. Even with such heresy, the experts work three times faster. But I personally do not have any desire to go to extremes, to prove something to someone, and all the more to justify myself. The qualification of my mind is too expensive to be wasted in such a miserable and wasteful way.
 
The respected gurus (all of them) would like to ask you to treat each other with more respect. What will you teach young people?
 
TheXpert:

Debunking fallacy #1: you can do without IndicatorCounted()

An indicator with it:

Without it, on the principle of hrenfx

Then we apply the indices to the chart and emulate the loss of connection while the automaton is running. Result:




IMHO: Comparison is not correct: an algorithm with recursion, all other things being equal, will always run slower. For the sake of purity of the experiment, it is better to use the same algorithm in the indicator and in the Expert Advisor.

What prevents the Expert Advisor from calculating the last calculated bar and, if the difference between the current number of bars and the last calculated bar is more than 1, recalculate from the appropriate position, as the indicator does?

 
GODZILLA:

Well, who and what learned to write, I think, it will be clearer from outside, about heresy - the level of your thinking, I think, by all indications, vividly resembles a logic of religious fanatics with whom it is useless and absolutely unnecessary to argue. Even with such heresy, the experts work three times faster. But I personally do not have any desire to go to extremes, to prove something to someone, and all the more to justify myself. The qualification of my mind is too expensive to be wasted in such a miserable and wasteful way.

Is it with this thing

//---- ЭМУЛЯЦИЯ ИНДИКАТОРНЫХ БУФЕРОВ
  int NewSize = iBars(symbol, timeframe);
  //----  Проверка на смену нулевого бара
  if(ArraySize(Ind_Buffer0) < NewSize)
    {
      //---- Установить прямое направление индексирования в массиве 
      ArraySetAsSeries(Ind_Buffer0, false);
      ArraySetAsSeries(Ind_Buffer1, false);
      ArraySetAsSeries(Ind_Buffer2, false);
      //---- Изменить размер эмулируемых индикаторных буферов 
      ArrayResize(Ind_Buffer0, NewSize); 
      ArrayResize(Ind_Buffer1, NewSize); 
      ArrayResize(Ind_Buffer2, NewSize); 
      //---- Установить обратное направление индексирования в массиве 
      ArraySetAsSeries(Ind_Buffer0, true);
      ArraySetAsSeries(Ind_Buffer1, true);
      ArraySetAsSeries(Ind_Buffer2, true); 
    } 
//----

you got the experts working fast? Who's a fanatic after that? Long checked, you can use the forum search.

 
granit77:
The respected gurus (all of them) would like to ask you to treat each other with more respect. What will you teach young people?

Personally, I am not at all offended by the accusation of religious fanaticism, because I know very well who and what I am. Besides, such an accusation is a good indicator of the level of thinking on the other side, an exhaustive indicator.
 
GODZILLA:
Well, who and what have learned to write, I think, from the outside will be more visible

Yeah, I can see that perfectly. Your credibility in my eyes is falling three times faster than before :)

VladislavVG:

IMHO: The comparison is not correct: an algorithm with recursion, all other things being equal, will always run slower. For the sake of purity of the experiment, it is better to use the same algorithm in the indicator and in the Expert Advisor.

The comparison is correct, for it is made not for speed comparison, but to clearly show the incorrectness of work.

What prevents the Expert Advisor from calculating the last calculated bar and, if the difference between the current number of bars and the last calculated bar is more than 1, recalculate it from the appropriate position, as the indicator does?

Why don't you try it?


The EA on the first tick after the link appears behaves quite differently to the indicator derived from the EA.

The above screenshot shows that after the connection breakdown the EA (not the indicator from the EA) compares with iCustom. The connection breakdown passes without any problems there.

You are wrong again. The Expert Advisor behaves similarly. You simply cannot correctly analyse your own logs. I have already explained the error, I do not want to repeat it.

Hint: Look for a few values after the break.

granit77:

Respected gurus (all of them) I would like to ask you to treat each other with more respect. What will you teach young people?

Maîtres should not carry heresies, that's one, and should be able to admit mistakes, that's two.
 
TheXpert:

You are wrong again. The advisor is behaving in a similar way. You simply cannot correctly analyse your own logs. I have already explained what the error is, I don't want to repeat it.

Hint: Look at several values after the gap.

Yes, I only gave a screenshot for one value after the break. Of course, I saw all the values and beyond (I don't do cheating, and especially not this stupid). The coincidence is complete (it didn't make it into the screenshot).

Unfortunately, the developers still don't understand the possible usefulness of IndicatorCounted() for EAs (judging by their response).

The indicator and the EA on the first tick after the gap (especially a long one) do not behave the same way. You can easily check this if you want to.

 
Integer:

Personally I'm not at all offended by accusing me of religious fanaticism, because I know very well who and what I am. Besides, such an accusation is a good indicator of the level of thinking on the other side, an exhaustive indicator.

Well, do you consider your thinking to be adequate and non-fanatical, for that matter? It's not enough that you didn't manage to prove your hypothesis-belief that the same code in an indicator will always be faster than in an EA, but instead you started an absolutely unclear and meaningless competition (by the way, it was good, because it led to an interesting solution of communication breakdown in the EA). By the way, I haven't noticed anywhere on our site that adviser's code should preferably be written in an indicator for performance acceleration, so this statement sounds strange, at least, and I think you will agree with it.

My assumption was based on the simple logic that calling an external function with passing a copy of the buffer and parameters takes more time than without it; why would you try to deny that I'm not sure.

Reason: