Dropdown menu to select drawing styles?

 
Hello. I am having difficulty finding a method to create a dropdown menu within an indicator that chooses between histogram and line. I am wondering if anyone could give me some example code or direct me to a resource that is not too complex. I would very much appreciate it :)
 
hellokitty123:
Hello. I am having difficulty finding a method to create a dropdown menu within an indicator that chooses between histogram and line. I am wondering if anyone could give me some example code or direct me to a resource that is not too complex. I would very much appreciate it :)

Create an enumeration for those options and declare an input variable of that type.

enum ENUM_DRAW_SELECT
{
   _DRAW_LINE_       = DRAW_LINE,        // Line
   _DRAW_HISTOGRAM_  = DRAW_HISTOGRAM    // Histogram
};

input ENUM_DRAW_SELECT
   DrawSelect = _DRAW_LINE_; // Select Drawing Style
Documentation on MQL5: Language Basics / Data Types / Integer Types / Enumerations
Documentation on MQL5: Language Basics / Data Types / Integer Types / Enumerations
  • www.mql5.com
Enumerations - Integer Types - Data Types - Language Basics - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Reason: