If you don't know the value, you can't supply it. You must default it and all further parameters in the iCustom call.
Ask the owner.
#property strict #property indicator_chart_window enum ENUM_FRUIT { APPLE = 1, // An Apple ORANGE = 3, // An Orange PEACH, // A Peach CHERRY = 8, // A Cherry GRAPE // A Grape }; input ENUM_FRUIT enumMyFruit = PEACH; // Select Favourite Fruit int OnInit() { return(INIT_SUCCEEDED); }; int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { return rates_total; };
enum ENUM_FRUIT { APPLE = 1, // An Apple ORANGE = 3, // An Orange PEACH, // A Peach CHERRY = 8, // A Cherry GRAPE // A Grape }; void MyFunction(void) { double bufferValue = iCustom( _Symbol, _Period, "TestFruit", APPLE, 0, 0 ); }
I am so disappointed with you guys!!! Thanks any way I have found the solution.
@ William Roeder @ Fernando Carreiro
I am so disappointed with you guys!!! Thanks any way I have found the solution.
Don't do that. Someone searching might find this thread and still be clueless. What was the problem? What solved what?
How To Ask Questions The Smart Way. 2004
When You Ask.
Follow up with a brief note on the solution.
@ William Roeder @ Fernando Carreiro
I guess there is reward or something for specific people to leave comment, Am I right , because people leave not relevant answers to my questions.
I asked totally different question.
William Roeder said Ask the owner. or use default value ! at list you could kindly answer my third question instead of telling the obvious!
Fernando Carreiro commentED how to use enum!!!! where I asked to how to use enum?!
Don't do that. Someone searching might find this thread and still be clueless. What was the problem? What solved what?
How To Ask Questions The Smart Way. 2004
When You Ask.
Follow up with a brief note on the solution.
that's exactly why I am writing this comment leaving not relevant comments first will confuse the asker second will wonder people who had he same ISSUE
I kindly and politely begging you people do not leave comment if you don't know the answer at list maybe some one could see this question and leave proper answer. this is not the first time I ended up with such attitude!
What wonderful news! To be criticized for offering assistance! How lovely!
I told you I am tankful but you did not answer my question! I just do not understand why you leave this comment! please tell me your comment will answer which part of my question?
- We didn't answer the question because we couldn't. There's no way to get the value of an enumeration from the GUI. Stop blaming us for stating the impossible.
- While doing something else I have found a way.
- Bring up the indicator's input tab and press Reset. (All values set to defaults.)
- Save a template.
- Open the template in notepad. You will find the default numerical values for all parameters including the enumeration.
- Bring up the indicator's input tab and press Reset. (All values set to defaults.)
- We didn't answer the question because we couldn't. There's no way to get the value of an enumeration from the GUI. Stop blaming us for stating the impossible.
- While doing something else I have found a way.
- Bring up the indicator's input tab and press Reset. (All values set to defaults.)
- Save a template.
- Open the template in notepad. You will find the default numerical values for all parameters including the enumeration.
- Bring up the indicator's input tab and press Reset. (All values set to defaults.)
Thanks , that's the only way I could find, I think there is no automatically way to do so.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi , I am using an indicator (MQL4) which one of its input argument is mystery Enum! I could not figure out how to input its value I thinks it is something like this :
as you can see items value are secret!
second can I at list choose between items first item ( of course in iCustom function) I know How to extract its value I just want to know is there an straight way to choose for example second option?
third how can I use its default value for start at list?( I used NULL but got 'NULL' - expression of 'void' type is illegal error)
thanks in advance...