Repository navigation
Expand file tree
/
Copy pathFinancialItem2D.cpp
More file actions
81 lines (70 loc) · 1.57 KB
/
Copy pathFinancialItem2D.cpp
File metadata and controls
81 lines (70 loc) · 1.57 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#include "wplot/FinancialItem2D.h"
namespace WPlot {
///////////////////////////////////////////////////////////////////////////////
// PUBLIC SECTION //
///////////////////////////////////////////////////////////////////////////////
FinancialItem2D::FinancialItem2D() :
Item2D(),
m_xValue(0.0),
m_values()
{}
/**
* Set the open value.
*
* @param[in] value Value.
*/
void FinancialItem2D::setOpenValue(const double &value) {
m_values.setOpen(value);
}
/**
* Set the high value.
*
* @param[in] value Value.
*/
void FinancialItem2D::setHighValue(const double &value) {
m_values.setHigh(value);
}
/**
* Set the low value.
*
* @param[in] value Value.
*/
void FinancialItem2D::setLowValue(const double &value) {
m_values.setLow(value);
}
/**
* Set the close value.
*
* @param[in] value Value.
*/
void FinancialItem2D::setCloseValue(const double &value) {
m_values.setClose(value);
}
/**
* Set all values at once.
*
* @param[in] open Open value.
* @param[in] high High value.
* @param[in] low Low value.
* @param[in] close Close value.
*/
void FinancialItem2D::setOHLC(const double &open, const double &high, const double &low, const double &close) {
m_values.set(open, high, low, close);
}
/**
* Set the item from OHLC item.
*
* @param[in] ohlc OHLC values.
*/
void FinancialItem2D::setOHLC(const OHLC &ohlc) {
m_values = ohlc;
}
/**
* Set the X coordinate for the item.
*
* @param[in] value X value.
*/
void FinancialItem2D::setXValue(const double &value) {
m_xValue = value;
}
} // namespace WPlot