Class Bar

java.lang.Object
velox.api.layer1.simplified.Bar

public class Bar
extends java.lang.Object
Single OHLC bar
  • Constructor Summary

    Constructors 
    Constructor Description
    Bar()  
    Bar​(double openPrice)  
    Bar​(Bar other)  
  • Method Summary

    Modifier and Type Method 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Bar

      public Bar​(Bar other)
    • Bar

      public Bar​(double openPrice)
    • Bar

      public Bar()
  • 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()