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
In external EA parameters I use parameter R only = 1 or 2 or 12 or 13 (general simple example). You can check this parameter in OnInit() and report an error if a citizen enters a different number by mistake. However, there are ENUM_... types for input. (eg. ENUM_MA_METHOD), when you can simply select a value from the expanded window.
Question. Is there an option where I can make such a construct, so that in external parameters by analogy with the ENUM_... appear only what the programmer intended, without the need to check OnInit(). I haven't found it in the documentation. If not, the wish is to do such a thing.
So do ENUM.
I even made a dirty trick using ENUM double arrays with limited steps (example here), but here I can't do without conversion into OnInit(), of course.So do ENUM.
I even made up my mind to use ENUM to create double arrays with limited steps (example here), but you can't do without conversion to OnInit(), of course.Like this! Thanks for the link, I'll figure it out myself.
This also works for input:
Type in the code and call up the window, see what the enum options look like.
The code will use enum variants and the input window will use comments.
I have an enum like this:
ZY if the enumerator options are not assigned values like MetaDriver then the defaults will be assigned consecutive values from 0.
This also works for input:
Type in the code and call up the window, see what the enum options look like.
The code will use enum variants and the input window will use comments.
Yep, confirm, it all works. :)
Something like this! Thanks for the link, I'll look it up myself.
How to know in OnTesterPass which parameters were used for optimization? I only see that these parameters are returned at the beginning of the array parameters of the FrameInputs function, but at what point do the optimized parameters end and the constant parameters begin?
I don't quite understand the question, but I can suggest a useful function - ParameterGetRange
Can you tell me why an error occurs when getting an indicator handle, if the name of the indicator to be called is contained in a variable?
I mean, there is no error like this:
This is how we get error 4802 (Indicator cannot be created):