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

 
hrenfx:

Great critique! Only not to my craft, but to the platform as a whole. This fact has been repeatedly mentioned to the developers. So the situation:

  1. You haven't had your terminal switched on for a week and you decide to run it, with a default EA running (this raises some questions about adequacy, but so be it).
  2. The terminal is connected, but the entire history is still running. The indicator sends its values to the Expert Advisor and the Expert Advisor starts trading based on these values.
  3. The terminal has downloaded the entire history and the indicator began to show completely different values. The Expert Advisor now obtains completely different values.

This is a well-known problem that the developers have been asked to solve a hundred times and added the flag that the entire history is pumped. But it has not been solved.

Now any Expert Advisor with indicators at such moments is ready to make a lot of troubles in trading. Therefore, we should not reduce the developers' problem to the code above. The variant with an indicator does not provide an acceptable solution.

Let's get closer to life: you run the Expert Advisor when you have already made sure that the entire history is pumped. If after that the connection is interrupted for a short period of time (less than a day), then my code will work absolutely correctly.


Don't look for problems in the world around you, look for them in yourself. So far, the terminal works the way Victor wrote it, and in these conditions your code will work incorrectly and it is not the developers of the terminal, but the author of this code, who will work incorrectly in the conditions described above, who will be guilty.

 
hrenfx:
So you're saying there's still no such code? I'm surprised that my elementary will fill that gap.

Haven't seen it so far. Although I've seen some articles, I haven't seen any good code. Although it takes five minutes to write it, but .....
 
Integer:

Victor, you'll get an answer now saying that we're cool, we don't work lower than H4 or something in the same style, or in other way, but with the same meaning ... or use a super-duper powerful VPS, and the account we have in the best DC in the world, which never fails connection.... etc. etc.

Got it! Still got it. His code is right and the terminal is wrong.
 
Vinin:

I haven't seen it until now. Although there have been some articles, I haven't seen any good code. Although it takes five minutes to write it, but .....

Well, not five minutes, about 15 minutes. But what for? If you could write a good programming guide for indicators, that would be another matter.
 
hrenfx:

Perhaps the man with the balls will say something.

No problem. Actually, in order to make your analogue of IndicatorCounted, you need an array with history to scan in case you miss it, i.e. in this particular case you essentially need a full recalculation every bar.

Perhaps another contest?

 

So guys, you still haven't cited a situation where my EA on REAL would produce incorrect values.

REAL means you do the right thing: you run the EA on a fully pumped up history. After that you do not turn off the terminal. Communication interruptions, as on any REAL, are perfectly acceptable.

So what is the problem on the REAL? I am not even talking about the tester.

 
hrenfx:

So guys, you still haven't cited a situation where my EA on REAL would produce incorrect values.

REAL means you do the right thing: you run the EA on a fully pumped up history. After that you do not turn off the terminal. Communication interruptions, as on any REAL, are perfectly acceptable.

So what is the problem on the REAL? Don't even mention the tester.


How many times do I have to explain the same thing to you to get it across, or at least that you notice it?
 
TheXpert:

No problem. Actually, in order to make your analogue of IndicatorCounted, you need an array with history to scan in case you miss it, i.e. in this particular case you essentially need a full recalculation of every bar.

Perhaps another contest?


Looking at the time of the bars is not an option, we don't know if the bar was missed by the terminal due to lack of communication or if it didn't actually happen.
 
Integer:
Looking at the timing of bars is not an option, you don't know if the terminal has missed a bar because of a lack of communication or if it hasn't actually happened.
So if the bar then appears, the comparison will reveal a discrepancy in the history, which is when you need to save it.
 
TheXpert:
So if the bar then appears, the comparison will reveal a discrepancy in the history, then that's when you need to save it.

Got it. If new bars appear between existing bars.
Reason: