Package velox.api.layer1.simplified
Class Bar
java.lang.Object
velox.api.layer1.simplified.Bar
public class Bar
extends java.lang.Object
Single OHLC bar
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description voidaddTrade(boolean isBuy, long volume, double price)Update bar based on the new tradedoublegetClose()doublegetHigh()doublegetLow()doublegetOpen()longgetVolumeBuy()longgetVolumeSell()longgetVolumeTotal()doublegetVwap()doublegetVwapBuy()doublegetVwapSell()voidsetClose(double close)voidsetHigh(double high)voidsetLow(double low)voidsetOpen(double open)voidsetVolumeBuy(long volumeBuy)voidsetVolumeSell(long volumeSell)voidstartNext()Set open/close prices to previous close price, clear other fields
-
Constructor Details
-
Method Details
-
addTrade
public void addTrade(boolean isBuy, long volume, double price)Update bar based on the new trade -
startNext
public void startNext()Set open/close prices to previous close price, clear other fields -
getOpen
public double getOpen() -
setOpen
public void setOpen(double open) -
getClose
public double getClose() -
setClose
public void setClose(double close) -
getHigh
public double getHigh() -
setHigh
public void setHigh(double high) -
getLow
public double getLow() -
setLow
public void setLow(double low) -
getVolumeBuy
public long getVolumeBuy() -
setVolumeBuy
public void setVolumeBuy(long volumeBuy) -
getVolumeSell
public long getVolumeSell() -
setVolumeSell
public void setVolumeSell(long volumeSell) -
getVolumeTotal
public long getVolumeTotal() -
getVwapBuy
public double getVwapBuy() -
getVwapSell
public double getVwapSell() -
getVwap
public double getVwap()
-