34 enum Value {
null_l,
csv_l,
inst_l,
volume_l,
sma_l,
ema_l,
wma_l,
macd_l,
boll_l,
rsi_l,
ad_l,
stochf_l};
44 static Indicator const Null,
StockCSV,
StockInst,
Volume,
SMA,
EMA,
WMA,
MACD,
BOLL,
RSI,
AD,
STOCHF;
63 std::string
const label ()
const;
90 void Set( std::string str_name, std::vector<int> & param );
100 void Change(
int new_value );
109 {
return a.
v_ == b.
v_; }
112 {
return a.
v_ != b.
v_; }
Value FindValue(std::string) const
friend std::ostream & operator<<(std::ostream &o, Indicator c)
Output the label.
static Indicator const STOCHF
std::vector< std::string > parse_description() const
Utility function to parse the description.
static std::vector< std::string > GetListAllIndicator()
Get a list of all indicator's label.
"Clever" enumeration of the ListDataStock type : StockCSV, Volume, EMA, BOLL,...
int nb_param() const
Nb of parameters necessary to be computed.
void Set(std::string str_name, std::vector< int > ¶m)
bool HasDefaultValues() const
Test functions if default values are provided.
static Indicator const Null
Predefined static instances of the class.
static Indicator const WMA
Indicator(Value v)
Constructors.
int MakeEColor(const char str_color)
bool NeedToComputeTA() const
Test function if this indicator is computed with TALib interface.
static Indicator const MACD
static Indicator const AD
static Indicator const RSI
static Indicator GetIndicator(const std::string &str_name)
Constructor with a string label.
int MakeColor(const char str_color)
static Indicator const Volume
int nb_output() const
Nb of ListDataStock output of TALib computation.
void Change(int new_value)
static Indicator const StockInst
friend bool operator!=(Indicator const &a, Indicator const &b)
static Indicator const EMA
Value
Internally define an enumeration.
static Indicator const StockCSV
int nb_input() const
Nb of ListDataStock input to be computed.
static Indicator const BOLL
std::string GetDescription() const
Graphical description.
std::vector< int > GetDefaultValues() const
Get the default values, return an empty vector if none are provided.
static Indicator const SMA
friend bool operator==(Indicator const &a, Indicator const &b)
std::string const label() const
Get the label.
Value integral() const
To use in the case of a switch.