Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 778 | blopes | 1 | package br.com.robo.model; |
| 2 | |||
| 3 | import java.time.LocalDateTime; |
||
| 4 | import java.util.ArrayList; |
||
| 5 | import java.util.List; |
||
| 6 | |||
| 7 | public class Candle { |
||
| 8 | |||
| 9 | private LocalDateTime time; |
||
| 10 | private Double open; |
||
| 11 | private Double high; |
||
| 12 | private Double low; |
||
| 13 | private Double close; |
||
| 14 | private Double volume; |
||
| 15 | |||
| 16 | private Integer tipoTemporizador; |
||
| 17 | |||
| 18 | public Candle(LocalDateTime time, Double open, Double high, Double low, Double close, Double volume) { |
||
| 19 | this.time = time; |
||
| 20 | this.open = open; |
||
| 21 | this.high = high; |
||
| 22 | this.low = low; |
||
| 23 | this.close = close; |
||
| 24 | this.volume = volume; |
||
| 25 | } |
||
| 26 | |||
| 27 | public Candle(LocalDateTime time, Double open, Double high, Double low, Double close, Integer tipoTemporizador) { |
||
| 28 | this.time = time; |
||
| 29 | this.open = open; |
||
| 30 | this.high = high; |
||
| 31 | this.low = low; |
||
| 32 | this.close = close; |
||
| 33 | this.tipoTemporizador = tipoTemporizador; |
||
| 34 | } |
||
| 35 | |||
| 36 | public Candle(LocalDateTime time, int abertura, int topo, int fundo, int fechamento, int tipoTemporizador) { |
||
| 37 | this.time = time; |
||
| 38 | this.open = new Double(abertura); |
||
| 39 | this.high = new Double(topo); |
||
| 40 | this.low = new Double(fundo); |
||
| 41 | this.close = new Double(fechamento); |
||
| 42 | this.tipoTemporizador = new Integer(tipoTemporizador); |
||
| 43 | } |
||
| 44 | |||
| 45 | public Candle(LocalDateTime time, double abertura, double topo, double fundo, double fechamento, int tipoTemporizador) { |
||
| 46 | this.time = time; |
||
| 47 | this.open = new Double(abertura); |
||
| 48 | this.high = new Double(topo); |
||
| 49 | this.low = new Double(fundo); |
||
| 50 | this.close = new Double(fechamento); |
||
| 51 | this.tipoTemporizador = new Integer(tipoTemporizador); |
||
| 52 | } |
||
| 53 | |||
| 54 | public LocalDateTime getTime() { |
||
| 55 | return time; |
||
| 56 | } |
||
| 57 | |||
| 58 | public Double getOpen() { |
||
| 59 | return open; |
||
| 60 | } |
||
| 61 | |||
| 62 | public Double getHigh() { |
||
| 63 | return high; |
||
| 64 | } |
||
| 65 | |||
| 66 | public Double getLow() { |
||
| 67 | return low; |
||
| 68 | } |
||
| 69 | |||
| 70 | public Double getClose() { |
||
| 71 | return close; |
||
| 72 | } |
||
| 73 | |||
| 74 | public Double getVolume() { |
||
| 75 | return volume; |
||
| 76 | } |
||
| 77 | |||
| 78 | public Integer getTipoTemporizador() { |
||
| 79 | return tipoTemporizador; |
||
| 80 | } |
||
| 81 | |||
| 82 | @Override |
||
| 83 | public String toString() { |
||
| 84 | return "Candle{" + |
||
| 85 | "time=" + time + |
||
| 86 | ", open=" + open + |
||
| 87 | ", high=" + high + |
||
| 88 | ", low=" + low + |
||
| 89 | ", close=" + close + |
||
| 90 | ", volume=" + volume + |
||
| 91 | '}'; |
||
| 92 | } |
||
| 93 | |||
| 94 | } |