-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathmain.cpp
More file actions
56 lines (41 loc) · 1.28 KB
/
main.cpp
File metadata and controls
56 lines (41 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include "Luffy.hpp"
#include <fstream>
#include <iostream>
#include <sstream>
using namespace std;
using namespace op;
class SMA : public CleanerBase {
public:
SMA(const int rolling_window, int buffer_day, const string &frequency)
: CleanerBase("SMA", rolling_window, buffer_day, frequency) {
auto module = std::make_shared<SMA>(*this);
env->save_module(name, module);
};
double calculate(const string &ticker) override {
cout << "keke" << endl;
return 0;
};
~SMA() { CleanerBase::~CleanerBase(); };
};
int main() {
// CsvReader ggss("/Users/chandler/Documents/CLionProjects/OnePyPlus/data/",
//"000001", "000001");
// MongodbReader lalala("000001_tushare", "000001");
MongodbReader lalala("EUR_USD_oanda", "EUR_USD");
Luffy haha("keke");
SMA jhjh(10, 10, "D");
vector<string> ticker_list = {"000001"};
// auto go = op::stock(ticker_list,
//"D",
// 100000,
//"2018-01-25",
//"2018-04-01",
//"tushare");
auto go = op::forex(ticker_list, "M30", 100000, "2017-01-25", "2017-03-01",
"oanda");
// go.env->is_show_today_signals=true;
go.sunny();
cout << (go.env->recorder->balance->latest());
// cout << "hahah";
// std::cin.get();
}