You need to declare an enum type like so:
enum EnumPositionType { Buy=0, Sell=1 }; input EnumPositionType Positions=Buy;
Similar to @lippmaj's response, but I would have a "both" option.
enum ENUM_TRADE_DIRECTIONS { TD_LONG, TD_SHORT, TD_BOTH }; input ENUM_TRADE_DIRECTIONS TRADE_DIRECTIONS = TD_BOTH;
Great ! Thanks you for your answers. I will try that.
Thierry
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
Hello,
I would like to implement a command in parameters to choose the direction of trading : Buy or Sell. Like in the example attached.
What type of variable is it ? Bool ?
I'm a real beginner in coding.
Thanks for your help.
Thierry