public class Bar
extends java.lang.Object
| Constructor and Description |
|---|
Bar() |
Bar(Bar other) |
Bar(double openPrice) |
| Modifier and Type | Method and Description |
|---|---|
void |
addTrade(boolean isBuy,
long volume,
double price)
Update bar based on the new trade
|
double |
getClose() |
double |
getHigh() |
double |
getLow() |
double |
getOpen() |
long |
getVolumeBuy() |
long |
getVolumeSell() |
long |
getVolumeTotal() |
double |
getVwap() |
double |
getVwapBuy() |
double |
getVwapSell() |
void |
setClose(double close) |
void |
setHigh(double high) |
void |
setLow(double low) |
void |
setOpen(double open) |
void |
setVolumeBuy(long volumeBuy) |
void |
setVolumeSell(long volumeSell) |
void |
startNext()
Set open/close prices to previous close price, clear other fields
|
public Bar(Bar other)
public Bar(double openPrice)
public Bar()
public void addTrade(boolean isBuy,
long volume,
double price)
public void startNext()
public double getOpen()
public void setOpen(double open)
public double getClose()
public void setClose(double close)
public double getHigh()
public void setHigh(double high)
public double getLow()
public void setLow(double low)
public long getVolumeBuy()
public void setVolumeBuy(long volumeBuy)
public long getVolumeSell()
public void setVolumeSell(long volumeSell)
public long getVolumeTotal()
public double getVwapBuy()
public double getVwapSell()
public double getVwap()