When does it make sense to keep part of the robot code in an indicator? - page 15
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
No, it won't. You can see in the code that the signal calculation process is controlled (only last bar or given nMax bars) by parameter prevVals[0]. If it is 0, we restore the calculation by nMax bars. The value of prevVals[0] is controlled by another code.
But let's not get sidetracked, let's get to the point. There are two options above, which is faster in the tester? So
How can I know if you don't have all the code. Put it in the EA as it should be there, then there will be a substantive conversation and you can compare performance.
I may have got the odds wrong, I'll check now, but the principle doesn't change.
I am not talking about coefficients. I mean the EMA gives wrong values during the first n bars but later everything is OK. The Expert Advisor should take it into account. Otherwise we will have problems with values at every connection failure
It's not about the coefficients. I mean the EMA does not give the correct value during the first n bars, after that everything is OK. The Expert Advisor should take it into account. Otherwise we will have problems with values at every connection failure
Is that okay?
It's not about the ratios. The EMA gives wrong value for the first n bars but later everything is OK. The Expert Advisor should take it into account. Otherwise we will have problems with values every time we break connection.
No problem, the indicator will recalculate after problems getting the data.
The fact that it's crooked on the left, at the start of the chart, isn't really such a problem either, the tester misses the first 1000 bars.
Here, exactly left (in the appendix).
How can I know if you don't have the whole code. Put it in the EA the way it should be there, then there will be a substantive conversation.
There won't be a problem, the indicator will recalculate after problems getting the data.
The fact that it's crooked on the left, at the start of the chart, isn't really such a problem either, the tester misses the first 1000 bars.
Here, exactly left (in appendix).
I was talking about the advisor, not the indicator. I have already seen it. Only I didn't say it all to you, I said it to hrenfx.
Is that okay?
All that remains to be done is to provide for connection interruptions and history bouncing (unfortunately, this happens). The indicator handles it without any problems. But the Expert Advisor does not see it.
Please test option
Not suitable for the advertised nomination. There will be errors after a break in communication, the smaller the timeframe, the more frequent and larger the errors will be.
All that remains to be done is to provide for connection interruptions and history bouncing (unfortunately, this happens). The indicator handles it without any problems. But the Expert Advisor does not see it.
In fact, now we are picking on the concept of trading. The Expert Advisor receives data from the indicator here and now. Suddenly, the history changes and the indicator changes its values dramatically. So, what did the Expert Advisor receive before? Let's recall what is being compared. And we are comparing the speed, in case anyone has forgotten. But despite all arguable picks, I will write an Expert Advisor that takes into account the gaps and history paging.
...and suddenly the story changes...
Amazing!