-
Notifications
You must be signed in to change notification settings - Fork 2
/
data-models.go
56 lines (46 loc) · 1.17 KB
/
data-models.go
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
package stockrate
type (
// StocksInfo holds the information related to datasource of stocks
StocksInfo map[string]stockURLValue
// StockPrice holds current price, previous close, open, variation, percentage, volume of stocks from BSE and NSE
StockPrice struct {
BSE symbolPriceValue
NSE symbolPriceValue
}
// StockTechnicals holds stock technical valuations
StockTechnicals map[string]technicalValue
// StockMovingAverage holds Moving average for 5, 10, 15, 20, 50, 100, 200 days respectively
StockMovingAverage map[int]movingAverageValue
// StockPivotLevels stores a stock pivote levels
StockPivotLevels map[string]pivotPointsValue
stockURLValue struct {
Sector string
Company string
Symbol string
}
symbolPriceValue struct {
Price float64
PreviousClose float64
Open float64
Variation float64
Percentage float64
Volume int64
}
technicalValue struct {
Level float64
Indication string
}
movingAverageValue struct {
SMA float64
Indication string
}
pivotPointsValue struct {
R1 float64
R2 float64
R3 float64
Pivot float64
S1 float64
S2 float64
S3 float64
}
)