#pragma once

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

namespace AI {

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

private:
    double previous_;
    SMA positiveSMA_;
    SMA negativeSMA_;
};

}
