Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1319
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
What do you mean by"masking format "? As usual, e.g. "*.csv", separately specify the directory to start the search.
Well, "usually" can be different. The standard ones for OS can be extended according to your needs. For example, you can specify date in name in different formats, etc.
Looking for a function to search the directory of a file by mask, the search should go through all subdirectories, the function should return an array with the full path of the file. Please share such a function.
FileFindFirst supports searching by mask. All that remains is to write a recursive function for all subdirectories.
If such a question arises, it means that it is too early to solve such a problem, you need to learn the basics. But now, instead of the evil me, some kind people will come and calmly explain everything.
And I'll just ask - have you looked at what is going on in this method at all?
Well, "usually" can be different. The standard operating system can also be extended to suit your needs. For example the date in the name can be set in different formats, etc.
I don't see the point in making it more complicated.
FileFindFirst
FileFindFirst supports searching by mask. It remains to write a recursive function for all subdirectories.
I know the theory, thank you.
Good afternoon everyone. I'm trying to write an adviser on a custom indicator.
On the chart, he draws arrows like this
The indicator has so many settings. First part.
and the second part of the settings
The indicator looks for divergences based on one of the 4 classic indicators - ao, stochastic, rsi, macd .
The peculiarity of the indicator is that it draws a signal arrow when the candle opens, that is at zero bar and while the candle is being formed, the arrow hangs, and after the candle is closed, it is not redrawn.
The indicator has 8 buffers. Because 8 arrows can be drawn - 4 for sale for each of the standard indicators and 4 for purchase.
It looks like this in the data window:
Like me I understand the zero buffer is the arrow on the stochastics on the villages. The first buffer is an arrow on the stochastic for a buy. The second buffer arrow on the ao sat down. The third buffer is an ao to buy arrow. The fourth buffer is an arrow on rsi to sit down. The fifth is the rsi arrow for buy. The sixth is the MACD arrow to the village And the seventh buffer is the MACD arrow for a buy.
I transferred all the input parameters of the indicator to the EA:
Further in it tick, for starters, I want to implement the simplest logic - an arrow appeared on any of the buffers, I open an order ...
To begin with, I declared variables for receiving signals for ao buy and sat, and through the iCustom function I get the value for ao buy from the third buffer and for ao sat from the second . And in the same way I get values for stochastic buy from zero buffer and for the stochastic sat down from the first buffer.
After I have received the values from the buffers into the variables, I check for the presence of an arrow on the chart.
In the strategy tester, it turns out that if I turn on the analysis by AO in the input parameters, then deals are opened - everything is fine ... And if I turn on the analysis by stochastics, then nothing happens - no errors or anything else. Tell me please - what am I doing wrong in getting the value of the indicator buffer or in checking that there is something in it? How to fix my mistake?
Thank you in advance. p / s I immediately answer the possible the question is, why are the comments written in caps - am I sick, should I do this? I am writing because it is convenient for me to watch it because of my first disability. groups after coma at 1.5 months.
To begin with, I declared variables for receiving signals for ao buy and sat, and through the iCustom function I get the value for ao buy from the third buffer and for ao sat from the second . And in the same way I get values for stochastic buy from zero buffer and for the stochastic sat down from the first buffer.
After I have received the values from the buffers into the variables, I check for the presence of an arrow on the chart.
In the strategy tester, it turns out that if I turn on the analysis by AO in the input parameters, then deals are opened - everything is fine ... And if I turn on the analysis by stochastics, then nothing happens - no errors or anything else. Tell me please - what am I doing wrong in getting the value of the indicator buffer or in checking that there is something in it? How to fix my mistake?
Thank you in advance. p / s I immediately answer the possible the question is, why are the comments written in caps - am I sick, should I do this? I am writing because it is convenient for me to watch it because of my first disability. groups after coma at 1.5 months.
There are a lot of unnecessary brackets in the code to begin with
and to see what the problem is without reading the code, you need to run the EA in the tester
Stupid. 132 bars. I have 6 values on each bar. How do I write it as an array? I don't want to use a structure.)
Uh...
what?