Questions from Beginners MQL5 MT5 MetaTrader 5 - page 242
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
You can go like this:
That's fine:
Thank you.
Question aboutArraySize, if I have the number of select [9] elements defined, will the function return a value of 10? or until I assign a value it will be 0?
Thank you.
Question aboutArraySize, if I have select [9] defined at once, will the function return a value of 10? or until I assign a value it will be 0?
Group functions for working with arrays
No more than four-dimensional arrays are allowed. Each dimension is indexed from 0 todimension_size-1. In a particular case of a one-dimensional array of 50 elements, calling the first element is array[0], the last one is array[49].
Here is a script to test it:
Thank you.
Question onArraySize, if I have the number of elements select [9] defined immediately, will the function return a value of 10? or until I assign a value it will be 0?
If the array is static and has a size of 10 cells, the ArraySize function will always return the number 10, regardless of the content of each cell.
If the array is dynamic, however, the ArraySize function will return its actual size (and this size can be changed).
Continuing to build my generator) The module is located in Include\Expert\Signal
1. I can't find it in the list of modules for the signal.
2. I'm confused by this line:
I need to get the difference betweenOn a bar with index 1. If I understand correctly, is the index in brackets?
3. Does this line specify the number of all buffers of the indicator or those to be used?
4. Please advise how to request the data of this generator from the script for verification?
Below is all the code. Maybe I have made a mistake somewhere else, please advise.
Continuing to build my generator) The module is located in Include\Expert\Signal
1. I can't find it in the list of modules for the signal.
2. I'm confused by this line:
I need to get the difference betweenOn a bar with index 1. If I understand correctly, is the index in brackets?
3. Does this line specify the number of all buffers of the indicator or those to be used?
4. Please advise how to request the data of this generator from the script for verification?
Below is all the code. Maybe I made a mistake somewhere else, please advise.
In the header after Class you need to write CSampelSignal
I made it like this:
I can't find it. In the menu I choose Generate EA.Made it like this:
I can't find it. In the menu I choose to generate an EA.I have to restart MetaEditor.
Opened it a few times, closed it. There's nothing.
Maybe it's because I missed the destructor. It doesn't compile, it gives an error.
~CSampleSignal' - member function not definedMade it like this:
I don't find it. In the menu I select Generate EA.Ah, in full, with the name of the hat, post the code, what religion doesn't allow :) ?
And yet, it's still worth reading:
MQL5 Wizard: How to write your own trading signals module
https://www.mql5.com/ru/forum/3724/page3#comment_66962
The error in the code is incorrect parameter description in the header. The colour highlighted is the modified code:
Of course, I entered the parameter values from the ceiling. These values are just for example.