All files / src/models ohlc-bar.model.ts

100% Statements 16/16
100% Branches 0/0
100% Functions 0/0
100% Lines 12/12

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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 498x           8x     8x       8x       8x       8x       8x       8x       8x       8x             8x   8x    
import {arrayProperty, model, property} from "@waytrade/microservice-core";
 
/**
 * A OHLC bar.
 */
@model("A OHLC bar.")
export class OHLCBar {
  /** The date and time (as a yyyymmss hh:mm:ss). */
  @property("The date and time (as a yyyymmss hh:mm:ss).")
  time?: string;
 
  /** The open price. */
  @property("The open price.")
  open?: number;
 
  /** The high price. */
  @property("The high price")
  high?: number;
 
  /** The low price. */
  @property("The low price.")
  low?: number;
 
  /** The close price. */
  @property(" The close price.")
  close?: number;
 
  /** The traded volume if available (only available for TRADES). */
  @property("The traded volume if available (only available for TRADES).")
  volume?: number;
 
  /** The Weighted Average Price (only available for TRADES). */
  @property("The Weighted Average Price (only available for TRADES).")
  WAP?: number;
 
  /** The number of trades during the bar timespan (only available for TRADES). */
  @property("The number of trades during the bar timespan (only available for TRADES).")
  count?: number;
}
 
/**
 * A chart bar.
 */
 @model("A list of OHLC bars.")
 export class OHLCBars {
   @arrayProperty(OHLCBar, "The bars")
   bars?: OHLCBar[];
 }