![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
moved to this thread, no answer in the Dummies)
I have not found anything on how to work with files, can someone kindly suggest how to organize a loop using CFileTxt, figuring out the number of lines in the file and get the value of each string in a text variable?
It seems to be simple, but no articles or manuals on this subject, or I've searched badly (
i have a good example of working with lines in MT4, it would be good if somebody wrote an article for MT5
It seems to be simple, but there are no articles or manuals on this subject, or I've searched badly again(
This is usually how I read txt:
if(filehandle!=INVALID_HANDLE)
while(StringFind(Stroka,"Конец файла",0)<0 && !IsStopped()){
{
Stroka=FileReadString(filehandle);
.........
}
}
That's usually how I read txt:
if(filehandle!=INVALID_HANDLE)
while(StringFind(Stroka,"Конец файла",0)<0 && !IsStopped()){
{
Stroka=FileReadString(filehandle);
.........
}
}
Thank you, I will look at your version
I triedCArrayString, it would be prettier than working with a text file, and the array can be saved in the file and there is sorting with substitutions.
Afternoon!
In MetaTrader5 it is possible to create an indicator which draws bars (#property indicator_type DRAW_BARS)
I have done it.
Now my question is: Can I automatically overlay other indicators on these bars?
1) simpler - for example a standard moving average, on HL/2 (yes, there is an option "use data from previous indicator", but there is no choice what kind)
2) more complicated - to apply to these bars an indicator that uses high, low, open, close?
Or for each indicator I have to manually add it through iCustom?
Now a question: is it possible to automatically overlay other indicators on these bars:
1) simpler - for example a standard moving average, on HL/2 (yes, there is an option "use data from previous indicator", but there is no choice what kind)
2) more complicated - to apply to these bars an indicator that uses high, low, open, close?
Have you tried to enter additional arrays for new indicator buffers, and use these new indicator buffers to draw the needed lines? Do you want to write the calculation part for these lines yourself?
That's exactly what I would like to avoid) That's why I asked here
I do not want to add fractals, moving averages and a couple more indicators just to see how they look
Then let's define the terms. In MQL5, an indicator is a separate program that reflects certain graphical constructions on the chart. When you talk about "indicator overlay", what exactly are we talking about? In particular, what are we talking about in the question "...Or, for each indicator you should manually add it through iCustom?
Then let's define the terms. In MQL5, an indicator is a separate program that reflects certain graphical constructions on the chart. When you talk about "indicator overlay", what exactly are we talking about? In particular, what exactly are we talking about in the question "...Or, you have to add each indicator manually through iCustom?
What I mean is the following:
Here I opened EURUSD H1 chart. I can put several moving averages on it. One by Close prices, one by Open prices, one by High prices and one by Low prices.
I can also throw a moving average on the previous moving average (which is the fourth one, on Low prices).
Now, let's continue.
I take an indicator from the website ( https://www.mql5.com/ru/code/337 ) that draws bars.
May I also use moving averages, which I used earlier? If so, how.
I can also throw a moving average over the previous moving average (which is fourth, at Low prices).
Now continuing. I take the indicator from the website ( https://www.mql5.com/ru/code/337 ), which draws bars. May I also use moving averages, which I used earlier? If so, how.