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
Thank you for such comprehensive answers and apologize for my haste and inattention while studying the documentation; the answers were indeed contained in the description of the OnCalculate function.
Apparently I was too quick to force the process of learning and missed studying the OnInit and OnCalculate descriptions.
Yedelkin:
Do these lines answer your question?
In this case, these values can't be calculated correctly (not enough history to calculate them), so they're bluntly assigned zero values.
// I would have preferred to assign them corresponding input data, but it doesn't make much difference.
Incorrectly put the question (it's obvious, I wrote the same in the comment to the line, and I understood that null-value assignment is present). To paraphrase
I put in the printout and see that values other than 0 in ExtLineBuffer are assigned from index limit-1to index rates_total-1, but in the chart the indicator is drawn in the entire space, hmm, then where is the assignment of values(other than zero) to the indicator buffer in the space from 0 to limit-1?
Thank you for such comprehensive answers and I apologize for my haste and inattention while studying the documentation; the answers were indeed contained in the description of the OnCalculate function.
Apparently I was too quick to force the process of learning and missed studying the OnInit and OnCalculate descriptions.
Paraphrasing
The fact that they can not be calculated and do not make sense is clear from the beginning. I looked, at 0 bar the value of a simple average (indicator), equated to the maximum price value (not always), at first I thought it was about the number of bars displayed on the chart and stored in the history, I switched this setting to "unlimited", the result has not changed, the indicator on the first (left) bars drawn, and its value is different from 0.I checked it and it looks the same. History in the settings is 100000 bars, I don't want to check for any unlimit, I believe it.)
I have no answer to "how is it possible", it's better to ask developers (e.g. in the "bugs, bugs, questions" branch, that is visited by developers very regularly).
I'm sure no miracles will appear here, most likely the terminal does not display all the history requested and the leftmost available (programmatically) bars are simply left out. :)
The fact that they cannot be calculated and do not make sense is clear from the beginning. I looked, at 0 bar, the value of a simple average (the indicator), equated to the maximum price value (not always), at first I thought it was about the number of bars displayed on the chart and stored in the history, I switched this option to an unlimited, the result has not changed, the indicator on the first (left) bars is drawn, and its value is different from 0.
I'm sure that no miracles will appear here, most likely the terminal does not quite display all of the requested history and the leftmost available (programmatically) bars are simply left out of the picture. :)
In general, you should start with the articles How to write an indicator in MQL5 and Indicator by indicator in MQL5.
Besides, there is a special branch in the appropriate section of the forum, which is aimed at answering such questions - What you need to know about indicators
In general, you should start with the articles How to write an indicator in MQL5 and Indicator by indicator in MQL5.
Besides, there is a special thread in the appropriate section of the forum, which is aimed at answering such questions - What you need to know about indicators
Good evening, I am investigating the structureof trade request result (MqlTradeResult). I have written Print(99999999999999999999) for this structure respectively; For many values Print has written zero, what is that!
Why do we write these lines? Why don't we analyse the result?
Regarding zeros: What kind of zeros cause disturbance?