-
Notifications
You must be signed in to change notification settings - Fork 98
/
Copy pathdatafile.h
59 lines (47 loc) · 1.45 KB
/
datafile.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
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef DATAFILE_H
#define DATAFILE_H
#include <vector>
#include <QString>
#include <QFile>
typedef struct
{
QString time; //时间
double openingPrice; //开盘
double highestBid; //最高
double lowestBid; //最低
double closeingPrice; //收盘
double amountOfIncrease; //涨幅
double amountOfAmplitude; //振幅
QString totalVolume; //总手
QString totalAmount; //金额
double turnoverRate; //换手率
double volumeAmount; //成交次数
double averageLine5; //5日均线
double averageLine10; //10日均线
double averageLine20; //20日均线
double averageLine30; //30日均线
double averageLine60; //60日均线
double ftotalVolume;
double ftotalAmount;
double volumeAverage5; //成交量5日均值
double volumeAverage10; //成交量10日均值
}KLine;
class DataFile
{
public:
explicit DataFile();
~DataFile();
bool readData(QString filestr);
std::vector<KLine> kline;
QFile* pfile = nullptr;
void calAverageLine();
void calAverageLine5();
void calAverageLine10();
void calAverageLine20();
void calAverageLine30();
void calAverageLine60();
void calvolumeAverage5();
void calvolumeAverage10();
void Corvert();
};
#endif // DATAFILE_H