#pragma once

#include "control_dialog.hh"
#include "../../TradeCore/abstract_strategy.hh"
#include <memory>

/**
 * @brief Strategy based on crossing of two moving averages
 * Used moving averages are EMA10 and EMA20
 */
class MovingAverages : public AbstractStrategy
{
public:
    MovingAverages();
    DataRequest requestedData() override;
    bool tradeData(const TradeData& data) override;
    OrderVector makeDecision() override;
    void onClientDoubleClicked() override;
    void decisionStatus(const OrderVector& status) override;

private:
    DataRequest dataRequest_;
    TradeData tradeData_;
    OrderVector decisionStatus_;
    std::unique_ptr<ControlDialog> dialog_;
    bool dataValid_;
};
