#pragma once

#include "abstract_indicator.hh"
#include "sma.hh"
#include "stdev.hh"

namespace AI {

class CCI : public AbstractIndicator
{
public:
    CCI(int period);
    CCI(const CCI&) = default;
    CCI& operator=(const CCI&) = default;
    void operator()(double value) override;
    double operator()() const override;
    void clear() override;

private:
    double typical_;
    SMA sma_;
    STDEV dev_;
};

}
