Alex2181:
Hi AlexHi guys! Is it possible to put limits on extern vars in the Inputs tab for an indicator? Let's say a var can be from 0 to 200. And you don't want the user to enter a value over 200 or a negative one.
I know I can correct this when the indicator starts, but if he enters the value in the Inputs tab it remains there.
Thanks!
No, there's no way to validate as the user actually inputs. The only thing you can do is as you suggest, correct the values when the indy/EA loads
Well you can use of course:
enum name of enumerable type
{
list of values
};
So that its not possible to choose a value that lies outside of the list of values.
Marco vd Heijden:
For sure, but in the example given, I don't think he wants to do an enumeration of every integer from 0 to 200 ;)
Well you can use of course:
So that its not possible to choose a value that lies outside of the list of values.Carl Schreiber:
Million thanks! Works like a charm!
You can check in OnInit():
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
Hi guys! Is it possible to put limits on extern vars in the Inputs tab for an indicator? Let's say a var can be from 0 to 200. And you don't want the user to enter a value over 200 or a negative one.
I know I can correct this when the indicator starts, but if he enters the value in the Inputs tab it remains there.
Thanks!