-
Notifications
You must be signed in to change notification settings - Fork 0
/
Stock.h
46 lines (38 loc) · 1.48 KB
/
Stock.h
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
#ifndef STOCK_H
#define STOCK_H
#include <vector>
#include "investment.h"
//code goes here
class Stock: public investment {
private:
std::string name;
std::vector<double> open, close, change;
//open and close value
// change is the difference between the two
std::vector<double> RSI; // Relative strength Index
std::vector<double> K; // Stochastic Calculator
int days; // total number of days.
//std::std::vector<bool> overpriced;
std::vector<int> nextMove; //1 for buying, 2 for selling
//3 for holding, 4 or everything means calculating
std::vector<bool> correct; // to indicate whether our prediction was correct or not
public:
Stock();
Stock(std::string); // constructor
~Stock(); // destructor
void setup_Investment(std::string str); // to setup investment
void read_csv(std::string str); // to read from csv files
void calc_change(); // in order to calculate change vetor from open and close
void rsi(); // to calculate rsi
void stochastic(); // to calculate schoastic
void plot_stochastic(); // to plot schoastic
void plot_rsi(); // to plot rsi
void plot_stock(); // to plot just the stock
void plot_trend(); // just a shortcut containing other plots data
void gen_suggestions();
void compare_suggestions();
void initiate_suggestion_system();
void setDays(const int); // to set the number of days you want to calculate/etc
int getDays() const; // to get the total number of days
};
#endif