Interface DataSeries


public interface DataSeries
Represents a series of price bars that are displayed on a chart. Values of the price bars are accessed by specifying the index when retrieving a value. Study values are stored in this structure as they are computed by a study. This interface also provides many convenience method for calculating moving averages, swing points, highest high, etc.
  • Method Summary

    Modifier and Type
    Method
    Description
    atr(int period)
    Calculates the average true range based on the most recent complete bars.
    atr(int index, int period)
    Calculates the average true range.
    atr(int index, int period, Instrument instr)
    Calculates the average true range.
    atr(int period, Instrument instr)
    Calculates the average true range based on the most recent complete bars.
    calcSwingPoints(boolean top, int strength)
    Calculates and returns a list of swing points of a given strength or greater.
    calcSwingPoints(boolean top, int strength, int maxBars)
    Calculates and returns a list of swing points of a given strength or greater.
    calcSwingPoints(int strength)
    Calculates and returns a list of swing points of a given strength or greater.
    calcSwingPoints(int strength, int maxBars)
    Calculates and returns a list of swing points of a given strength or greater.
    dema(int index, int period, Enums.BarInput key, Instrument instr)
    Calculates the Double Exponential Moving Average (2*EMA - EMA(EMA)).
    dema(int index, int period, Object key)
    Calculates the Double Exponential Moving Average (2*EMA - EMA(EMA)).
    ema(int index, int period, Enums.BarInput key, Instrument instr)
    Calculates the Exponential Moving Average.
    ema(int index, int period, Object key)
    Calculates the Exponential Moving Average.
    int
    findIndex(long time)
    Searches for the index that contains the given time.
    float
    Gets the ask close value of the latest price bar.
    float
    getAskClose(int index)
    Gets the ask close value of the price bar at the given index.
    float
    getAskClose(int index, Instrument instr)
    Gets the ask close value of the price bar for the given instrument at the given index.
    float
    Gets the ask close value of the latest price bar for the given instrument.
    float
    Gets the high ask value of the latest price bar and default instrument.
    float
    getAskHigh(int index)
    Gets the high ask value of the price bar at the given index for the default instrument.
    float
    getAskHigh(int index, Instrument instr)
    Gets the high ask value of the price bar for the given instrument at the given index.
    float
    Gets the high ask value of the latest price bar for the given instrument.
    float
    Gets the ask low value of the latest price bar.
    float
    getAskLow(int index)
    Gets the ask low value of the price bar at the given index.
    float
    getAskLow(int index, Instrument instr)
    Gets the ask low value of the price bar at the given index.
    float
    Gets the ask low value of the latest price bar.
    float
    Gets the open ask value of the latest price bar.
    float
    getAskOpen(int index)
    Gets the open ask value of the price bar at the given index.
    float
    getAskOpen(int index, Instrument instr)
    Gets the open ask value of the price bar for the given instrument at the given index.
    float
    Gets the open ask value of the latest price bar for the given instrument.
    getBarColor(int index, Object key)
    Gets the color of the bar at the given index with the given value key.
    Gets the color of the latest bar with the given key.
    Gets the type of data available in this data series.
    Gets the size of the bars in this data series.
    float
    Gets the close bid value of the latest price bar.
    float
    getBidClose(int index)
    Gets the close bid value of the price bar at the given index.
    float
    getBidClose(int index, Instrument instr)
    Gets the close bid value of the price bar for the given instrument at the given index.
    float
    Gets the close bid value of the latest price bar for the given instrument.
    float
    Gets the high bid value of the latest price bar.
    float
    getBidHigh(int index)
    Gets the high bid value of the price bar at the given index.
    float
    getBidHigh(int index, Instrument instr)
    Gets the high bid value of the price bar for the given instrument at the given index.
    float
    Gets the high bid value of the latest price bar for the given instrument.
    float
    Gets the bid low value of the latest price bar.
    float
    getBidLow(int index)
    Gets the bid low value of the price bar at the given index.
    float
    getBidLow(int index, Instrument instr)
    Gets the bid low value of the price bar at the given index.
    float
    Gets the bid low value of the latest price bar.
    float
    Gets the open bid value of the latest price bar.
    float
    getBidOpen(int index)
    Gets the open bid value of the price bar at the given index.
    float
    getBidOpen(int index, Instrument instr)
    Gets the open bid value of the price bar for the given instrument at the given index.
    float
    Gets the open bid value of the latest price bar for the given instrument.
    getBoolean(int index, Object key)
    Gets the boolean value for the given key at the given index.
    boolean
    getBoolean(int index, Object key, boolean def)
    Gets the boolean value at the given index for the given key.
    Gets the boolean value for the given key for the latest index.
    boolean
    getBoolean(Object key, boolean def)
    Gets the boolean value for the given key for the latest index.
    float
    Gets the close value of the latest price bar.
    float
    getClose(int index)
    Gets the close value of the price bar at the given index.
    float
    getClose(int index, Instrument instr)
    Gets the close value of the price bar for the given instrument at the given index.
    float
    Gets the close value of the latest price bar for the given instrument.
    getDouble(int index, Enums.BarInput key, Instrument instr)
    Gets the numeric value at the given index specified by the given key for the given instrument.
    getDouble(int index, Object key)
    Gets the numeric value at the given index specified by the given key.
    double
    getDouble(int index, Object key, double def)
    Gets the numeric value at the given index specified by the given key.
    getDouble(long startTime, Enums.BarInput key, Instrument instr)
    Gets the numeric value at the given index specified by the given key.
    getDouble(long startTime, Object key)
    Gets the numeric value at the given index specified by the given key.
    Gets last numeric value (most recent) in the data series specified by the given key.
    Gets last numeric value (most recent) in the data series specified by the given key.
    int
    Gets the bar index of the last visible bar on the chart.
    long
    Gets the end time of the latest bar.
    long
    getEndTime(int index)
    Gets the end time (in milliseconds since 1970) of the bar at the given index.
    getFloat(int index, Enums.BarInput key, Instrument instr)
    Gets the numeric value at the given index specified by the given key.
    getFloat(int index, Object key)
    Gets the numeric value at the given index specified by the given key.
    float
    getFloat(int index, Object key, float def)
    Gets the numeric value at the given index specified by the given key.
    getFloat(long startTime, Enums.BarInput key, Instrument instr)
    Gets the numeric value at the given index specified by the given key.
    getFloat(long startTime, Object key)
    Gets the numeric value at the given index specified by the given key.
    Gets last numeric value (most recent) in the data series specified by the given key.
    Gets last numeric value (most recent) in the data series specified by the given key.
    default Float
    getFloat(Object key, float def)
    Gets last numeric value (most recent) in the data series specified by the given key.
    float
    Gets the high value for the latest price bar.
    float
    getHigh(int index)
    Gets the value of the price bar at the given index.
    float
    getHigh(int index, Instrument instr)
    Gets the high value of the price bar of the given instrument at the give index.
    float
    Gets the high value of the price bar of the given instrument for the latest price bar.
    Gets the primary instrument for the data in this data series.
    int
    getInt(int index, Object key)
    Convenience method.
    int
    Convenience method.
    float
    Gets the low value of the latest price bar.
    float
    getLow(int index)
    Gets the low value of the price bar at the given index.
    float
    getLow(int index, Instrument instr)
    Gets the low value of the price bar at the given index for the given instrument.
    float
    Gets the low value of the latest price bar for the given instrument.
    Calculates and returns the Negative Directional Movement (-DM) of the latest price bar.
    getNegativeDM(int index)
    Calculates and returns the Negative Directional Movement (-DM) of the price bar at the given index.
    getNegativeDM(int index, Instrument instr)
    Calculates and returns the Negative Directional Movement (-DM) of the price bar at the given index.
    Calculates and returns the Negative Directional Movement (-DM) of the latest price bar.
    float
    Gets the open value of the latest price bar.
    float
    getOpen(int index)
    Gets the open value of the price bar at the given index.
    float
    getOpen(int index, Instrument instr)
    Gets the open value of the price bar for the given instrument at the given index.
    float
    Gets the open value of the latest price bar for the given instrument.
    long
    Gets the open interest of the latest price bar.
    long
    getOpenInterest(int index)
    Gets the open interest of the price bar at the given index.
    long
    getOpenInterest(int index, Instrument instr)
    Gets the open interest of the price bar for the given instrument at the given index.
    long
    Gets the open interest of the latest price bar for the given instrument.
    getPathColor(int index, Object key)
    Gets the color of the path at the given index.
    Gets the color of the latest index of the path with the given key.
    Calculates and returns the Positive Directional Movement (+DM) of the latest price bar.
    getPositiveDM(int index)
    Calculates and returns the Positive Directional Movement (+DM) of the price bar at the given index.
    getPositiveDM(int index, Instrument instr)
    Calculates and returns the Positive Directional Movement (+DM) of the price bar at the given index.
    Calculates and returns the Positive Directional Movement (+DM) of the latest price bar.
    Gets the color of the latest price bar.
    getPriceBarColor(int index)
    Gets the color of the price bar at the given index.
    Calculates and returns the range of the price bar at the latest index.
    getRange(int index)
    Calculates and returns the range of the price bar at the given index.
    getRange(int index, Instrument instr)
    Calculates and returns the range of the price bar at the given index.
    Calculates and returns the range of the price bar at the latest index.
    float
    Gets the real high value of the latest price bar.
    float
    getRealHigh(int index)
    Gets the real high value of the price bar at the given index (Renko Bars only).
    float
    Gets the real low value of the latest price bar (Renko Bars only).
    float
    getRealLow(int index)
    Gets the real low value of the price bar at the given index (Renko Bars only).
    int
    Gets the bar index of the first visible bar on the chart.
    long
    Gets the start time (in milliseconds since 1970) of the latest bar.
    long
    getStartTime(int index)
    Gets the start time (in milliseconds since 1970) of the bar at the given index.
    Calculates and returns the True Range of the latest price bar.
    getTrueRange(int index)
    Calculates and returns the True Range of the price bar at the given index.
    getTrueRange(int index, Instrument instr)
    Calculates and returns the True Range of the price bar at the given index.
    Calculates and returns the True Range of the latest price bar.
    Calculates and returns the Typical Price (TP = (High + Low + Close)/3) of the latest price bar.
    getTypicalPrice(int index)
    Calculates and returns the Typical Price (TP = (High + Low + Close)/3) of the price bar at the given index.
    getTypicalPrice(int index, Instrument instr)
    Calculates and returns the Typical Price (TP = (High + Low + Close)/3) of the price bar at the given index.
    Calculates and returns the Typical Price (TP = (High + Low + Close)/3) of the latest price bar.
    getValue(int index, Enums.BarInput key, Instrument instr)
    Gets last value (most recent) in the data series specified by the given key.
    getValue(int index, Object key)
    Gets the value at the given index associated with the given key.
    Gets last value (most recent) in the data series specified by the given key.
    Gets last value (most recent) in the data series specified by the given key.
    long
    Gets the end time of the last visible bar on the chart.
    long
    Gets the start time of the first visible bar on the chart.
    long
    Gets the volume of the latest price bar.
    long
    getVolume(int index)
    Gets the volume of the price bar at the given index.
    long
    getVolume(int index, Instrument instr)
    Gets the volume of the price bar for the given instrument at the given index.
    long
    Gets the volume of the latest price bar for the given instrument.
    float
    Gets the volume of the latest price bar (as a floating point value).
    float
    getVolumeAsFloat(int index)
    Gets the volume of the price bar at the given index (as a floating point value).
    float
    getVolumeAsFloat(int index, Instrument instr)
    Gets the volume of the price bar for the given instrument at the given index (as a floating point value).
    float
    Gets the volume of the latest price bar for the given instrument (as a floating point value).
    boolean
    Determines if data is available for the primary instrument in this series.
    boolean
    Determines if data is available for the given instrument in this series.
    highest(int index, int period, Enums.BarInput key, Instrument instr)
    Returns the highest value over the given sequence of values.
    highest(int index, int period, Object key)
    Returns the highest value over the given sequence of values.
    Returns the highest value of the visible bars (between getStartIndex() and getEndIndex()).
    Returns the highest value of the visible bars (between getStartIndex() and getEndIndex()).
    boolean
    isBarComplete(int index)
    Determines if the bar at the given index is complete Note: this is only relevant if the index is the last in the series.
    boolean
    isComplete(int index)
    Determines if values stored at the bar at the given index are complete.
    boolean
    isComplete(int index, Object key)
    Determines if the values stored at the given index are complete (for the specified value key).
    boolean
    Determines if the values stored at the last bar are complete.
    boolean
    Determines if the end index is the latest bar.
    boolean
    isPathBreak(int index, Object key)
    Indicates that there is a break in a series of values that is rendered as a path.
    boolean
    isSignalTriggered(int index, Object key)
    Checks if the given signal has been triggered for the given bar index.
    kama(int index, int period, double C, Enums.BarInput key, Instrument instr)
    Calculates the Kaufmann Adaptive Moving Average (null is returned if there is not enough data).
    kama(int index, int period, double C, Object key)
    Calculates the Kaufmann Adaptive Moving Average (null is returned if there is not enough data).
    kama(int index, int period, Enums.BarInput key, Instrument instr)
    Calculates the Kaufmann Adaptive Moving Average (null is returned if there is not enough data).
    kama(int index, int period, Object key)
    Calculates the Kaufmann Adaptive Moving Average (null is returned if there is not enough data).
    lowest(int index, int period, Enums.BarInput key)
    Returns the lowest value over the given sequence of values.
    lowest(int index, int period, Enums.BarInput key, Instrument instr)
    Returns the lowest value over the given sequence of values.
    lowest(int index, int period, Object key)
    Returns the lowest value over the given sequence of values.
    Returns the lowest value of the visible bars (between getStartIndex() and getEndIndex()).
    Returns the lowest value of the visible bars (between getStartIndex() and getEndIndex()).
    ma(Enums.MAMethod method, int index, int period, Enums.BarInput key, Instrument instr)
    Calculates a Moving Average.
    ma(Enums.MAMethod method, int index, int period, Object key)
    Calculates a Moving Average.
    mema(int index, int period, Enums.BarInput key, Instrument instr)
    Calculates the Modified Exponential Moving Average.
    mema(int index, int period, Object key)
    Calculates the Modified Exponential Moving Average.
    float
    mfm(int index)
    Calculates the Money Flow Multiplier.
    float
    mfm(int index, Instrument instr)
    Calculates the Money Flow Multiplier.
    roc(int index, int period, Enums.BarInput key, Instrument instr)
    Rate Of Change.
    roc(int index, int period, Object key)
    Rate Of Change.
    void
    setBarColor(int index, Object key, Color color)
    Sets the color of the bar at the given index.
    void
    setBarColor(Object key, Color color)
    Sets the color of the bar at the latest index.
    void
    setBoolean(int index, Object key, Boolean value)
    Sets the boolean value for the given index and key.
    void
    setBoolean(Object key, Boolean value)
    Sets the boolean value for the latest index and key.
    void
    setComplete(int index)
    Indicate the the values stored at the specified index are complete.
    void
    setComplete(int index, boolean b)
    Indicate the the values stored at the specified index are complete.
    void
    setComplete(int index, Object key)
    Indicate the the values stored at the specified index are complete for the specified value key (no further computation is required).
    void
    setComplete(int index, Object key, boolean b)
    Indicate the the values stored at the specified index are complete for the specified value key (no further computation is required).
    void
    setDouble(int index, Object key, Double value)
    Sets a numeric value at the given index and identifies it using the key.
    void
    setDouble(Object key, Double value)
    Sets a numeric value at the latest index and identifies it using the key.
    void
    setFloat(int index, Object key, Float value)
    Sets a numeric value at the given index and identifies it using the key.
    void
    setFloat(Object key, Float value)
    Sets a numeric value at the latest index and identifies it using the key.
    void
    setInt(int index, Object key, int val)
    Convenience method.
    void
    setInt(Object key, int val)
    Convenience method.
    void
    setPathBreak(int index, Object key, boolean b)
    Indicates that there is a break in a series of values that is rendered as a path.
    void
    setPathColor(int index, Object key, Color color)
    Sets the color of the path at the given index.
    void
    setPathColor(Object key, Color color)
    Sets the color of the path at the latest index.
    void
    setPriceBarColor(int index, Color color)
    Sets the color of the price bar at the given index.
    void
    Sets the color of the price bar at the latest index.
    void
    setSignalTriggered(int index, Object key, boolean b)
    Sets the flag indicating that the given signal was triggered for the given bar index.
    void
    setValue(int index, Object key, Object value)
    Sets the value for the given index and key.
    void
    setValue(Object key, Object value)
    Sets the value for the latest index and key.
    int
    Gets the number of elements in this data series.
    sma(int index, int period, Enums.BarInput key, Instrument instr)
    Calculates the Simple Moving Average (null is returned if there is not enough data).
    sma(int index, int period, Object key)
    Calculates the Simple Moving Average (null is returned if there is not enough data).
    smma(int index, int period, Enums.BarInput key, Instrument instr)
    Calculates the Smoothed Moving Average.
    smma(int index, int period, Object key)
    Calculates the Smoothed Moving Average.
    std(int index, int period, Enums.BarInput key, Instrument instr)
    Calculates the Standard Deviation (null is returned if there is not enough data).
    std(int index, int period, Object key)
    Calculates the Standard Deviation (null is returned if there is not enough data).
    stochasticK(int index, int period)
    Calculates the stochastic 'K' value using price data.
    stochasticK(int index, int period, Enums.BarInput key, Instrument instr)
    Calculates the stochastic 'K' value using the given key.
    stochasticK(int index, int period, Instrument instr)
    Calculates the stochastic 'K' value using price data.
    stochasticK(int index, int period, Object key)
    Calculates the stochastic 'K' value using the given key.
    sum(int index, int period, Enums.BarInput key, Instrument instr)
    Returns the sum of the values over the given sequence of values.
    sum(int index, int period, Object key)
    Returns the sum of the values over the given sequence of values.
    tema(int index, int period, Enums.BarInput key, Instrument instr)
    Calculates the Triple Exponential Moving Average (3*EMA - 3*EMA(EMA) + EMA(EMA(EMA))).
    tema(int index, int period, Object key)
    Calculates the Triple Exponential Moving Average (3*EMA - 3*EMA(EMA) + EMA(EMA(EMA))).
    tma(int index, int period, Enums.BarInput key, Instrument instr)
    Calculates the Triangular Moving Average (SMA(SMA)).
    tma(int index, int period, Object key)
    Calculates the Triangular Moving Average (SMA(SMA)).
    vwma(int index, int period, Enums.BarInput key, Instrument instr)
    Calculates the Volume Weighted Moving Average (null is returned if there is not enough data).
    vwma(int index, int period, Object key)
    Calculates the Volume Weighted Moving Average (null is returned if there is not enough data).
    wma(int index, int period, Enums.BarInput key, Instrument instr)
    Calculates the Weighted Moving Average (null is returned if there is not enough data).
    wma(int index, int period, Object key)
    Calculates the Weighted Moving Average (null is returned if there is not enough data).
  • Method Details

    • size

      int size()
      Gets the number of elements in this data series.
      Returns:
      the number of elements in this data series.
    • getBarSize

      BarSize getBarSize()
      Gets the size of the bars in this data series.
      Returns:
      the bar size of this data series.
    • hasData

      boolean hasData(Instrument instr)
      Determines if data is available for the given instrument in this series.
      Parameters:
      instr - instrument
      Returns:
      true if data is available for this instrument.
    • hasData

      boolean hasData()
      Determines if data is available for the primary instrument in this series.
      Returns:
      true if data is available in this series.
    • getBarData

      Enums.BarData getBarData()
      Gets the type of data available in this data series.
      Returns:
      the type of bar data in this series (ie Ask, Bid, MidPoint and Last Price)
    • getInstrument

      Instrument getInstrument()
      Gets the primary instrument for the data in this data series.
      Returns:
      the primary instrument for this data series.
    • getHigh

      float getHigh(int index)
      Gets the value of the price bar at the given index.
      Parameters:
      index - bar index
      Returns:
      the high value of the price bar at the given index.
    • getHigh

      float getHigh()
      Gets the high value for the latest price bar.
      Returns:
      the high value of the latest price bar.
    • getHigh

      float getHigh(int index, Instrument instr)
      Gets the high value of the price bar of the given instrument at the give index. Note: this works for linear bar sizes only.
      Parameters:
      index - bar index
      instr - instrument
      Returns:
      the high value of the price bar of the given instrument at the given index.
    • getHigh

      float getHigh(Instrument instr)
      Gets the high value of the price bar of the given instrument for the latest price bar. Note: this works for linear bar sizes only. Note: this works for linear bar sizes only.
      Parameters:
      instr - instrument
      Returns:
      high bar value for the instrument at the latest index
    • getAskHigh

      float getAskHigh(int index)
      Gets the high ask value of the price bar at the given index for the default instrument.
      Parameters:
      index - bar index
      Returns:
      the high ask value of the price bar at the given index.
    • getAskHigh

      float getAskHigh()
      Gets the high ask value of the latest price bar and default instrument.
      Returns:
      the high ask value of the latest price bar.
    • getAskHigh

      float getAskHigh(int index, Instrument instr)
      Gets the high ask value of the price bar for the given instrument at the given index.
      Parameters:
      index - bar index
      instr - instrument
      Returns:
      the high ask value of the price bar for the given instrument at the given index.
    • getAskHigh

      float getAskHigh(Instrument instr)
      Gets the high ask value of the latest price bar for the given instrument.
      Parameters:
      instr - instrument
      Returns:
      the high ask value of the latest price bar for the given instrument.
    • getBidHigh

      float getBidHigh(int index)
      Gets the high bid value of the price bar at the given index.
      Parameters:
      index - bar index
      Returns:
      the high bid value of the price bar at the given index.
    • getBidHigh

      float getBidHigh()
      Gets the high bid value of the latest price bar.
      Returns:
      the high bid value of the latest price bar.
    • getBidHigh

      float getBidHigh(int index, Instrument instr)
      Gets the high bid value of the price bar for the given instrument at the given index.
      Parameters:
      index - bar index
      instr - instrument
      Returns:
      the high bid value of the price bar for the given instrument at the given index.
    • getBidHigh

      float getBidHigh(Instrument instr)
      Gets the high bid value of the latest price bar for the given instrument.
      Parameters:
      instr - instrument
      Returns:
      the high bid value of the latest price bar for the given instrument.
    • getRealHigh

      float getRealHigh(int index)
      Gets the real high value of the price bar at the given index (Renko Bars only).
      Parameters:
      index - bar index
      Returns:
      the real high value of the price bar at the given index (Renko Bars only).
    • getRealHigh

      float getRealHigh()
      Gets the real high value of the latest price bar.
      Returns:
      the real high value of the latest price bar.
    • getLow

      float getLow(int index)
      Gets the low value of the price bar at the given index.
      Parameters:
      index - bar index
      Returns:
      the low value of the price bar at the given index.
    • getLow

      float getLow()
      Gets the low value of the latest price bar.
      Returns:
      the low value of the latest price bar.
    • getAskLow

      float getAskLow(int index)
      Gets the ask low value of the price bar at the given index.
      Parameters:
      index - bar index
      Returns:
      the ask low value of the price bar at the given index.
    • getAskLow

      float getAskLow()
      Gets the ask low value of the latest price bar.
      Returns:
      the ask low value of the latest price bar.
    • getBidLow

      float getBidLow(int index)
      Gets the bid low value of the price bar at the given index.
      Parameters:
      index - bar index
      Returns:
      the bid low value of the price bar at the given index.
    • getBidLow

      float getBidLow()
      Gets the bid low value of the latest price bar.
      Returns:
      the bid low value of the latest price bar.
    • getLow

      float getLow(int index, Instrument instr)
      Gets the low value of the price bar at the given index for the given instrument.
      Parameters:
      index - bar index
      instr - instrument
      Returns:
      the low value of the price bar at the given index for the given instrument.
    • getLow

      float getLow(Instrument instr)
      Gets the low value of the latest price bar for the given instrument.
      Parameters:
      instr - instrument
      Returns:
      the low value of the latest price bar for the given instrument.
    • getAskLow

      float getAskLow(int index, Instrument instr)
      Gets the ask low value of the price bar at the given index.
      Parameters:
      index - bar index
      instr - instrument
      Returns:
      the ask low value of the price bar at the given index.
    • getAskLow

      float getAskLow(Instrument instr)
      Gets the ask low value of the latest price bar.
      Parameters:
      instr - instrument
      Returns:
      the ask low value of the latest price bar.
    • getBidLow

      float getBidLow(int index, Instrument instr)
      Gets the bid low value of the price bar at the given index.
      Parameters:
      index - bar index
      instr - instrument
      Returns:
      the bid low value of the price bar at the given index.
    • getBidLow

      float getBidLow(Instrument instr)
      Gets the bid low value of the latest price bar.
      Parameters:
      instr - instrument
      Returns:
      the bid low value of the latest price bar.
    • getRealLow

      float getRealLow(int index)
      Gets the real low value of the price bar at the given index (Renko Bars only).
      Parameters:
      index - bar index
      Returns:
      the real low value of the price bar at the given index (Renko Bars only).
    • getRealLow

      float getRealLow()
      Gets the real low value of the latest price bar (Renko Bars only).
      Returns:
      the real low value of the latest price bar (Renko Bars only).
    • getOpen

      float getOpen(int index)
      Gets the open value of the price bar at the given index.
      Parameters:
      index - bar index
      Returns:
      the open value of the price bar at the given index.
    • getOpen

      float getOpen()
      Gets the open value of the latest price bar.
      Returns:
      the open value of the latest price bar.
    • getAskOpen

      float getAskOpen(int index)
      Gets the open ask value of the price bar at the given index.
      Parameters:
      index - bar index
      Returns:
      the open ask value of the price bar at the given index.
    • getAskOpen

      float getAskOpen()
      Gets the open ask value of the latest price bar.
      Returns:
      the open ask value of the latest price bar.
    • getBidOpen

      float getBidOpen(int index)
      Gets the open bid value of the price bar at the given index.
      Parameters:
      index - bar index
      Returns:
      the open bid value of the price bar at the given index.
    • getBidOpen

      float getBidOpen()
      Gets the open bid value of the latest price bar.
      Returns:
      the open bid value of the latest price bar.
    • getOpen

      float getOpen(int index, Instrument instr)
      Gets the open value of the price bar for the given instrument at the given index.
      Parameters:
      index - bar index
      instr - instrument
      Returns:
      the open value of the price bar for the given instrument at the given index.
    • getOpen

      float getOpen(Instrument instr)
      Gets the open value of the latest price bar for the given instrument.
      Parameters:
      instr - instrument
      Returns:
      the open value of the latest price bar for the given instrument.
    • getAskOpen

      float getAskOpen(int index, Instrument instr)
      Gets the open ask value of the price bar for the given instrument at the given index.
      Parameters:
      index - bar index
      instr - instrument
      Returns:
      the open ask value of the price bar for the given instrument at the given index.
    • getAskOpen

      float getAskOpen(Instrument instr)
      Gets the open ask value of the latest price bar for the given instrument.
      Parameters:
      instr - instrument
      Returns:
      the open ask value of the latest price bar for the given instrument.
    • getBidOpen

      float getBidOpen(int index, Instrument instr)
      Gets the open bid value of the price bar for the given instrument at the given index.
      Parameters:
      index - bar index
      instr - instrument
      Returns:
      the open bid value of the price bar for the given instrument at the given index.
    • getBidOpen

      float getBidOpen(Instrument instr)
      Gets the open bid value of the latest price bar for the given instrument.
      Parameters:
      instr - instrument
      Returns:
      the open bid value of the latest price bar for the given instrument.
    • getClose

      float getClose(int index)
      Gets the close value of the price bar at the given index.
      Parameters:
      index - bar index
      Returns:
      the close value of the price bar at the given index.
    • getClose

      float getClose()
      Gets the close value of the latest price bar.
      Returns:
      the close value of the latest price bar.
    • getAskClose

      float getAskClose(int index)
      Gets the ask close value of the price bar at the given index.
      Parameters:
      index - bar index
      Returns:
      the ask close value of the price bar at the given index.
    • getAskClose

      float getAskClose()
      Gets the ask close value of the latest price bar.
      Returns:
      the ask close value of the latest price bar.
    • getBidClose

      float getBidClose(int index)
      Gets the close bid value of the price bar at the given index.
      Parameters:
      index - bar index
      Returns:
      the close bid value of the price bar at the given index.
    • getBidClose

      float getBidClose()
      Gets the close bid value of the latest price bar.
      Returns:
      the close bid value of the latest price bar.
    • getClose

      float getClose(int index, Instrument instr)
      Gets the close value of the price bar for the given instrument at the given index.
      Parameters:
      index - bar index
      instr - instrument
      Returns:
      the close value of the price bar for the given instrument at the given index.
    • getClose

      float getClose(Instrument instr)
      Gets the close value of the latest price bar for the given instrument.
      Parameters:
      instr - instrument
      Returns:
      the close value of the latest price bar for the given instrument.
    • getAskClose

      float getAskClose(int index, Instrument instr)
      Gets the ask close value of the price bar for the given instrument at the given index.
      Parameters:
      index - bar index
      instr - instrument
      Returns:
      the ask close value of the price bar for the given instrument at the given index.
    • getAskClose

      float getAskClose(Instrument instr)
      Gets the ask close value of the latest price bar for the given instrument.
      Parameters:
      instr - instrument
      Returns:
      the ask close value of the latest price bar for the given instrument.
    • getBidClose

      float getBidClose(int index, Instrument instr)
      Gets the close bid value of the price bar for the given instrument at the given index.
      Parameters:
      index - bar index
      instr - instrument
      Returns:
      the close bid value of the price bar for the given instrument at the given index.
    • getBidClose

      float getBidClose(Instrument instr)
      Gets the close bid value of the latest price bar for the given instrument.
      Parameters:
      instr - instrument
      Returns:
      the close bid value of the latest price bar for the given instrument.
    • getVolume

      long getVolume(int index)
      Gets the volume of the price bar at the given index.
      Parameters:
      index - bar index
      Returns:
      the volume of the price bar at the given index.
    • getVolumeAsFloat

      float getVolumeAsFloat(int index)
      Gets the volume of the price bar at the given index (as a floating point value).
      Parameters:
      index - bar index
      Returns:
      the volume of the price bar at the given index.
    • getVolume

      long getVolume()
      Gets the volume of the latest price bar.
      Returns:
      the volume of the latest price bar.
    • getVolumeAsFloat

      float getVolumeAsFloat()
      Gets the volume of the latest price bar (as a floating point value).
      Returns:
      the volume of the latest price bar.
    • getVolume

      long getVolume(int index, Instrument instr)
      Gets the volume of the price bar for the given instrument at the given index.
      Parameters:
      index - bar index
      instr - instrument
      Returns:
      the volume of the price bar for the given instrument at the given index.
    • getVolumeAsFloat

      float getVolumeAsFloat(int index, Instrument instr)
      Gets the volume of the price bar for the given instrument at the given index (as a floating point value).
      Parameters:
      index - bar index
      instr - instrument
      Returns:
      the volume of the price bar for the given instrument at the given index.
    • getVolume

      long getVolume(Instrument instr)
      Gets the volume of the latest price bar for the given instrument.
      Parameters:
      instr - instrument
      Returns:
      the volume of the latest price bar for the given instrument.
    • getVolumeAsFloat

      float getVolumeAsFloat(Instrument instr)
      Gets the volume of the latest price bar for the given instrument (as a floating point value).
      Parameters:
      instr - instrument
      Returns:
      the volume of the latest price bar for the given instrument.
    • getOpenInterest

      long getOpenInterest(int index)
      Gets the open interest of the price bar at the given index.
      Parameters:
      index - bar index
      Returns:
      the open interest of the price bar at the given index.
    • getOpenInterest

      long getOpenInterest()
      Gets the open interest of the latest price bar.
      Returns:
      the open interest of the latest price bar.
    • getOpenInterest

      long getOpenInterest(int index, Instrument instr)
      Gets the open interest of the price bar for the given instrument at the given index.
      Parameters:
      index - bar index
      instr - instrument
      Returns:
      the open interest of the price bar for the given instrument at the given index.
    • getOpenInterest

      long getOpenInterest(Instrument instr)
      Gets the open interest of the latest price bar for the given instrument.
      Parameters:
      instr - instrument
      Returns:
      the open interest of the latest price bar for the given instrument.
    • getStartTime

      long getStartTime()
      Gets the start time (in milliseconds since 1970) of the latest bar.
      Returns:
      the start time (in milliseconds since 1970) of the latest bar.
    • getStartTime

      long getStartTime(int index)
      Gets the start time (in milliseconds since 1970) of the bar at the given index.
      Parameters:
      index - bar index
      Returns:
      the start time (in milliseconds since 1970) of the bar at the given index.
    • getEndTime

      long getEndTime()
      Gets the end time of the latest bar.
      Returns:
      the end time (in milliseconds since 1970) of the latest bar.
    • getEndTime

      long getEndTime(int index)
      Gets the end time (in milliseconds since 1970) of the bar at the given index.
      Parameters:
      index - bar index
      Returns:
      the end time (in milliseconds since 1970) of the bar at the given index.
    • getStartIndex

      int getStartIndex()
      Gets the bar index of the first visible bar on the chart.
      Returns:
      the index of the first visible bar on the chart.
    • getVisibleStartTime

      long getVisibleStartTime()
      Gets the start time of the first visible bar on the chart.
      Returns:
      the start time of the start index
    • getEndIndex

      int getEndIndex()
      Gets the bar index of the last visible bar on the chart.
      Returns:
      the index of the last visible bar on the chart.
    • getVisibleEndTime

      long getVisibleEndTime()
      Gets the end time of the last visible bar on the chart.
      Returns:
      the end time of the end index
    • isLatestData

      boolean isLatestData()
      Determines if the end index is the latest bar.
      Returns:
      true if the endIndex is equal to the latest bar.
    • setComplete

      void setComplete(int index)
      Indicate the the values stored at the specified index are complete. (no further computation is required)
      Parameters:
      index - bar index
    • setComplete

      void setComplete(int index, boolean b)
      Indicate the the values stored at the specified index are complete. (no further computation is required)
      Parameters:
      index - bar index
      b - true if the bar is complete
    • isComplete

      boolean isComplete(int index)
      Determines if values stored at the bar at the given index are complete.
      Parameters:
      index - bar index
      Returns:
      true if the values stored at the given index are complete.
    • isLastBarComplete

      boolean isLastBarComplete()
      Determines if the values stored at the last bar are complete.
      Returns:
      true if the last bar is completed
    • isBarComplete

      boolean isBarComplete(int index)
      Determines if the bar at the given index is complete Note: this is only relevant if the index is the last in the series.
      Parameters:
      index - bar index
      Returns:
      true if the bar at the given index is complete.
    • setComplete

      void setComplete(int index, Object key)
      Indicate the the values stored at the specified index are complete for the specified value key (no further computation is required).
      Parameters:
      index - bar index
      key - value key
    • setComplete

      void setComplete(int index, Object key, boolean b)
      Indicate the the values stored at the specified index are complete for the specified value key (no further computation is required).
      Parameters:
      index - bar index
      key - value key
      b - true if the bar is complete
    • isComplete

      boolean isComplete(int index, Object key)
      Determines if the values stored at the given index are complete (for the specified value key).
      Parameters:
      index - bar index
      key - value key
      Returns:
      true if the values stored at the given index are complete (for the specified value key).
    • setDouble

      void setDouble(int index, Object key, Double value)
      Sets a numeric value at the given index and identifies it using the key.
      Parameters:
      index - bar index
      key - value key
      value - value to store at the given index and key
    • setDouble

      void setDouble(Object key, Double value)
      Sets a numeric value at the latest index and identifies it using the key.
      Parameters:
      key - value key
      value - double value
    • getDouble

      Double getDouble(int index, Object key)
      Gets the numeric value at the given index specified by the given key.
      Parameters:
      index - bar index
      key - value key
      Returns:
      value assigned to the given index and value key
    • getDouble

      Double getDouble(int index, Enums.BarInput key, Instrument instr)
      Gets the numeric value at the given index specified by the given key for the given instrument.
      Parameters:
      index - bar index
      key - BarInput key
      instr - instrument
      Returns:
      numeric value at the given index specified by the given key for the given instrument
    • getDouble

      double getDouble(int index, Object key, double def)
      Gets the numeric value at the given index specified by the given key. The default value def is returned if the values was not found.
      Parameters:
      index - bar index
      key - value key
      def - default value to return if no value was found
      Returns:
      double value at the given index and key
    • getDouble

      Double getDouble(long startTime, Object key)
      Gets the numeric value at the given index specified by the given key.
      Parameters:
      startTime - start time of the bar in milliseconds since 1970
      key - value key
      Returns:
      value at the given bar and key (null if no value)
    • getDouble

      Double getDouble(long startTime, Enums.BarInput key, Instrument instr)
      Gets the numeric value at the given index specified by the given key.
      Parameters:
      startTime - start time of the bar in milliseconds since 1970
      key - value key
      instr - instrument
      Returns:
      value at the given bar and key (null if no value)
    • getDouble

      Double getDouble(Object key)
      Gets last numeric value (most recent) in the data series specified by the given key.
      Parameters:
      key - value key
      Returns:
      double value for the latest bar and given key
    • getDouble

      Double getDouble(Enums.BarInput key, Instrument instr)
      Gets last numeric value (most recent) in the data series specified by the given key.
      Parameters:
      key - input key
      instr - instrument
      Returns:
      most recent number value associated with the given key
    • setFloat

      void setFloat(int index, Object key, Float value)
      Sets a numeric value at the given index and identifies it using the key.
      Parameters:
      index - index of the bar
      key - key that identifies the value
      value - float value
    • setFloat

      void setFloat(Object key, Float value)
      Sets a numeric value at the latest index and identifies it using the key.
      Parameters:
      key - key that identifies the value
      value - float value
    • getFloat

      Float getFloat(int index, Object key)
      Gets the numeric value at the given index specified by the given key.
      Parameters:
      index - bar index
      key - key that identifies the value
      Returns:
      numeric value associated with the given key and index
    • getFloat

      Float getFloat(int index, Enums.BarInput key, Instrument instr)
      Gets the numeric value at the given index specified by the given key.
      Parameters:
      index - bar index
      key - input key
      instr - instrument
      Returns:
      numeric value associated with the given key, index and instrument
    • getFloat

      float getFloat(int index, Object key, float def)
      Gets the numeric value at the given index specified by the given key. The default value def is returned if the values was not found.
      Parameters:
      index - bar index
      key - input key
      def - default value to return if null
      Returns:
      numeric value associated with the given key and instrument (default value if not found)
    • getFloat

      Float getFloat(long startTime, Object key)
      Gets the numeric value at the given index specified by the given key.
      Parameters:
      startTime - start time of the bar in milliseconds since 1970
      key - value key
      Returns:
      numeric value associated with the given key and start time
    • getFloat

      Float getFloat(long startTime, Enums.BarInput key, Instrument instr)
      Gets the numeric value at the given index specified by the given key.
      Parameters:
      startTime - milliseconds since 1970
      key - bar input key
      instr - instrument
      Returns:
      numeric value associated with the given key, start time and instrument
    • getFloat

      Float getFloat(Object key)
      Gets last numeric value (most recent) in the data series specified by the given key.
      Parameters:
      key - value key
      Returns:
      numeric value associated with the given key (latest index)
    • getFloat

      default Float getFloat(Object key, float def)
      Gets last numeric value (most recent) in the data series specified by the given key.
      Parameters:
      key - value key
      def - default value to return if the value is null
      Returns:
      numeric value associated with the given key (latest index)
    • getFloat

      Float getFloat(Enums.BarInput key, Instrument instr)
      Gets last numeric value (most recent) in the data series specified by the given key.
      Parameters:
      key - bar input key
      instr - instrument
      Returns:
      numeric value associated with the given key and instrument (latest index)
    • findIndex

      int findIndex(long time)
      Searches for the index that contains the given time.
      Parameters:
      time - time in milliseconds since 1970
      Returns:
      index of the bar that contains the given time
    • getInt

      int getInt(int index, Object key)
      Convenience method. Gets the value at the given index and converts it to an int. 0 is returned if the value is null.
      Parameters:
      index - bar index
      key - value key
      Returns:
      integer value
    • getInt

      int getInt(Object key)
      Convenience method. Gets the value at the latest index and converts it to an int. 0 is returned if the value is null.
      Parameters:
      key - value key
      Returns:
      integer value assigned to the given key at the latest bar
    • setInt

      void setInt(int index, Object key, int val)
      Convenience method. Sets the value at the given index and as an int.
      Parameters:
      index - bar index
      key - value key
      val - value to assign
    • setInt

      void setInt(Object key, int val)
      Convenience method. Sets the value at the latest index and as an int.
      Parameters:
      key - value key
      val - integer value
    • setBoolean

      void setBoolean(int index, Object key, Boolean value)
      Sets the boolean value for the given index and key.
      Parameters:
      index - bar index
      key - value key
      value - boolean value to assign
    • setBoolean

      void setBoolean(Object key, Boolean value)
      Sets the boolean value for the latest index and key.
      Parameters:
      key - value key
      value - boolean value to assign
    • getBoolean

      Boolean getBoolean(Object key)
      Gets the boolean value for the given key for the latest index.
      Parameters:
      key - value key
      Returns:
      boolean value assigned to the key for the latest index
    • getBoolean

      boolean getBoolean(Object key, boolean def)
      Gets the boolean value for the given key for the latest index. The value def is returned if there is no value.
      Parameters:
      key - value key
      def - default value to return
      Returns:
      boolean value assigned to the given key at the latest index.
    • getBoolean

      Boolean getBoolean(int index, Object key)
      Gets the boolean value for the given key at the given index.
      Parameters:
      index - bar index
      key - value key
      Returns:
      boolean value assigned to the given key and index
    • getBoolean

      boolean getBoolean(int index, Object key, boolean def)
      Gets the boolean value at the given index for the given key. The value 'def' is returned if a value is not found.
      Parameters:
      index - bar index
      key - value key
      def - default value to return if no value is found
      Returns:
      boolean value at the given index for the given key
    • setValue

      void setValue(int index, Object key, Object value)
      Sets the value for the given index and key.
      Parameters:
      index - bar index
      key - value key
      value - value to store
    • setValue

      void setValue(Object key, Object value)
      Sets the value for the latest index and key.
      Parameters:
      key - value key
      value - value to store
    • getValue

      Object getValue(int index, Object key)
      Gets the value at the given index associated with the given key.
      Parameters:
      index - bar index
      key - value key
      Returns:
      value at the given index and key
    • getValue

      Object getValue(Object key)
      Gets last value (most recent) in the data series specified by the given key.
      Parameters:
      key - value key
      Returns:
      value assigned to the given key for the latest bar index.
    • getValue

      Object getValue(Enums.BarInput key, Instrument instr)
      Gets last value (most recent) in the data series specified by the given key.
      Parameters:
      key - bar input key
      instr - instrument
      Returns:
      value of the input key for the given instrument at the latest index.
    • getValue

      Object getValue(int index, Enums.BarInput key, Instrument instr)
      Gets last value (most recent) in the data series specified by the given key.
      Parameters:
      index - bar index
      key - input key
      instr - instrument
      Returns:
      value of the input key for the given instrument at the given index.
    • setPriceBarColor

      void setPriceBarColor(int index, Color color)
      Sets the color of the price bar at the given index.
      Parameters:
      index - bar index
      color - bar color
    • setPriceBarColor

      void setPriceBarColor(Color color)
      Sets the color of the price bar at the latest index.
      Parameters:
      color - bar color
    • getPriceBarColor

      Color getPriceBarColor(int index)
      Gets the color of the price bar at the given index.
      Parameters:
      index - bar index
      Returns:
      color assigned to the given bar index
    • getPriceBarColor

      Color getPriceBarColor()
      Gets the color of the latest price bar.
      Returns:
      color assigned to the latest price bar
    • setBarColor

      void setBarColor(int index, Object key, Color color)
      Sets the color of the bar at the given index.
      Parameters:
      index - bar index
      key - bar key (identifies the bar)
      color - bar color
    • setBarColor

      void setBarColor(Object key, Color color)
      Sets the color of the bar at the latest index.
      Parameters:
      key - bar key (identifies the bar)
      color - bar color
    • getBarColor

      Color getBarColor(int index, Object key)
      Gets the color of the bar at the given index with the given value key.
      Parameters:
      index - bar index
      key - bar key (identifies the bar)
      Returns:
      color assigned to the given bar
    • getBarColor

      Color getBarColor(Object key)
      Gets the color of the latest bar with the given key.
      Parameters:
      key - bar key (identifies the bar)
      Returns:
      color assigned to the bar with the given key.
    • setPathColor

      void setPathColor(int index, Object key, Color color)
      Sets the color of the path at the given index.
      Parameters:
      index - bar index
      key - value key (identifies the path)
      color - color to assign
    • setPathColor

      void setPathColor(Object key, Color color)
      Sets the color of the path at the latest index.
      Parameters:
      key - path key (identifies the path)
      color - color to assign
    • getPathColor

      Color getPathColor(int index, Object key)
      Gets the color of the path at the given index.
      Parameters:
      index - bar index
      key - path key (identifies the path)
      Returns:
      the color assigned to the path at the given bar index and path key
    • getPathColor

      Color getPathColor(Object key)
      Gets the color of the latest index of the path with the given key.
      Parameters:
      key - path key (identifies the path)
      Returns:
      the color assigned to the path at the given bar index and path key
    • getTrueRange

      Float getTrueRange(int index)
      Calculates and returns the True Range of the price bar at the given index.
      Parameters:
      index - bar index
      Returns:
      true range for the price bar at the given index (default instrument)
    • getTrueRange

      Float getTrueRange()
      Calculates and returns the True Range of the latest price bar.
      Returns:
      true range for the latest price bar (default instrument)
    • getTrueRange

      Float getTrueRange(int index, Instrument instr)
      Calculates and returns the True Range of the price bar at the given index.
      Parameters:
      index - bar index
      instr - instrument
      Returns:
      true range for the price bar at the given index and given instrument
    • getTrueRange

      Float getTrueRange(Instrument instr)
      Calculates and returns the True Range of the latest price bar.
      Parameters:
      instr - instrument
      Returns:
      true range for the latest price bar and given instrument
    • getTypicalPrice

      Float getTypicalPrice(int index)
      Calculates and returns the Typical Price (TP = (High + Low + Close)/3) of the price bar at the given index.
      Parameters:
      index - bar index
      Returns:
      typical price for the given bar index
    • getTypicalPrice

      Float getTypicalPrice()
      Calculates and returns the Typical Price (TP = (High + Low + Close)/3) of the latest price bar.
      Returns:
      typical price for the latest bar
    • getTypicalPrice

      Float getTypicalPrice(int index, Instrument instr)
      Calculates and returns the Typical Price (TP = (High + Low + Close)/3) of the price bar at the given index.
      Parameters:
      index - bar index
      instr - instrument
      Returns:
      typical price for the given bar index and instrument
    • getTypicalPrice

      Float getTypicalPrice(Instrument instr)
      Calculates and returns the Typical Price (TP = (High + Low + Close)/3) of the latest price bar.
      Parameters:
      instr - instrument
      Returns:
      typical price for the latest bar and instrument
    • getRange

      Float getRange()
      Calculates and returns the range of the price bar at the latest index.
      Returns:
      range of the price bar for the latest index
    • getRange

      Float getRange(Instrument instr)
      Calculates and returns the range of the price bar at the latest index.
      Parameters:
      instr - instrument
      Returns:
      range of the price bar for the latest index and instrument
    • getRange

      Float getRange(int index)
      Calculates and returns the range of the price bar at the given index.
      Parameters:
      index - bar index
      Returns:
      range of the price bar for the given index
    • getRange

      Float getRange(int index, Instrument instr)
      Calculates and returns the range of the price bar at the given index.
      Parameters:
      index - bar index
      instr - instrument
      Returns:
      range of the price bar for the given index and instrument
    • getPositiveDM

      Float getPositiveDM()
      Calculates and returns the Positive Directional Movement (+DM) of the latest price bar.
      Returns:
      positive DM for the latest price bar
    • getPositiveDM

      Float getPositiveDM(Instrument instr)
      Calculates and returns the Positive Directional Movement (+DM) of the latest price bar.
      Parameters:
      instr - instrument
      Returns:
      positive DM for the latest price bar and given instrument
    • getPositiveDM

      Float getPositiveDM(int index)
      Calculates and returns the Positive Directional Movement (+DM) of the price bar at the given index.
      Parameters:
      index - bar index
      Returns:
      positive DM for the latest price bar and given instrument
    • getPositiveDM

      Float getPositiveDM(int index, Instrument instr)
      Calculates and returns the Positive Directional Movement (+DM) of the price bar at the given index.
      Parameters:
      index - bar index
      instr - instrument
      Returns:
      positive DM for the given index and instrument
    • getNegativeDM

      Float getNegativeDM()
      Calculates and returns the Negative Directional Movement (-DM) of the latest price bar.
      Returns:
      negative DM for the latest price bar
    • getNegativeDM

      Float getNegativeDM(int index)
      Calculates and returns the Negative Directional Movement (-DM) of the price bar at the given index.
      Parameters:
      index - bar index
      Returns:
      negative DM for the given bar index
    • getNegativeDM

      Float getNegativeDM(Instrument instr)
      Calculates and returns the Negative Directional Movement (-DM) of the latest price bar.
      Parameters:
      instr - instrument
      Returns:
      negative DM for the latest price bar and given instrument
    • getNegativeDM

      Float getNegativeDM(int index, Instrument instr)
      Calculates and returns the Negative Directional Movement (-DM) of the price bar at the given index.
      Parameters:
      index - bar index
      instr - instrument
      Returns:
      negative DM for the given bar index and instrument
    • atr

      Double atr(int period)
      Calculates the average true range based on the most recent complete bars.
      Parameters:
      period - number of bars
      Returns:
      average true range for the given period
    • atr

      Double atr(int period, Instrument instr)
      Calculates the average true range based on the most recent complete bars.
      Parameters:
      period - number of bars
      instr - instrument
      Returns:
      average true range for the given period and instrument
    • atr

      Double atr(int index, int period)
      Calculates the average true range. Null values and values of Double.NaN are ignored in the calculation. Null is returned if there is not enough data.
      Parameters:
      index - bar index
      period - number of bars
      Returns:
      average true range for the given bar index and period
    • atr

      Double atr(int index, int period, Instrument instr)
      Calculates the average true range. Null values and values of Double.NaN are ignored in the calculation. Null is returned if there is not enough data.
      Parameters:
      index - bar index
      period - number of bars
      instr - instrument
      Returns:
      average true range for the given bar index and period (for the given instrument)
    • ma

      Double ma(Enums.MAMethod method, int index, int period, Object key)
      Calculates a Moving Average. Null values and values of Double.NaN are ignored in the calculation. Null is returned if there is not enough data.
      Parameters:
      method - calculation method
      index - bar index to start at
      period - number of bars
      key - value key
      Returns:
      computed moving average using the given method, index, period and value key
    • ma

      Double ma(Enums.MAMethod method, int index, int period, Enums.BarInput key, Instrument instr)
      Calculates a Moving Average. Null values and values of Double.NaN are ignored in the calculation. Null is returned if there is not enough data.
      Parameters:
      method - calculation method
      index - bar index to start at
      period - number of bars
      key - bar input key
      instr - instrument
      Returns:
      computed moving average using the given method, index, period, bar input and instrument
    • stochasticK

      Double stochasticK(int index, int period, Object key)
      Calculates the stochastic 'K' value using the given key. This is calculated as K = 100*( (value(key, index) - lowest(index, period, key)) / (highest(index, period, key) - lowest(index, period, key)) ) Null is returned if there is not enough data.
      Parameters:
      index - bar index
      period - number of bars
      key - value key
      Returns:
      stochasticK value for the given index, period and value key
    • stochasticK

      Double stochasticK(int index, int period)
      Calculates the stochastic 'K' value using price data. This is calculated as K = 100*( (getClose(index) - lowest(index, period, LOW)) / (highest(index, period, HIGH) - lowest(index, period, LOW)) ) Null is returned if there is not enough data.
      Parameters:
      index - bar index
      period - number of bars
      Returns:
      stochasticK value for the given index and period
    • stochasticK

      Double stochasticK(int index, int period, Enums.BarInput key, Instrument instr)
      Calculates the stochastic 'K' value using the given key. This is calculated as K = 100*( (value(key, index) - lowest(index, period, key)) / (highest(index, period, key) - lowest(index, period, key)) ) Null is returned if there is not enough data.
      Parameters:
      index - bar index
      period - number of bars
      key - bar input key
      instr - instrument
      Returns:
      stochasticK value for the given index and period
    • stochasticK

      Double stochasticK(int index, int period, Instrument instr)
      Calculates the stochastic 'K' value using price data. This is calculated as K = 100*( (getClose(index) - lowest(index, period, LOW)) / (highest(index, period, HIGH) - lowest(index, period, LOW)) ) Null is returned if there is not enough data.
      Parameters:
      index - bar index
      period - number of bars
      instr - instrument
      Returns:
      stochasticK value for the given index and period
    • mfm

      float mfm(int index)
      Calculates the Money Flow Multiplier. This is defined as: [(Close - Low) - (High - Close)]/(High - Low). 0 is returned if (High - Low) == 0
      Parameters:
      index - bar index
      Returns:
      money flow multiplier for the given bar index
    • mfm

      float mfm(int index, Instrument instr)
      Calculates the Money Flow Multiplier. This is defined as: [(Close - Low) - (High - Close)]/(High - Low). 0 is returned if (High - Low) == 0
      Parameters:
      index - bar index
      instr - instrument
      Returns:
      money flow multiplier for the given bar index and instrument
    • roc

      Double roc(int index, int period, Object key)
      Rate Of Change. Defined as the change between the most recent value and the value 'n' periods back. (Current Value - Value 'n' Periods Ago)/Value 'n' Periods Ago
      Parameters:
      index - bar index
      period - number of bars to look back
      key - value key
      Returns:
      rate of change for the given parameters
    • roc

      Double roc(int index, int period, Enums.BarInput key, Instrument instr)
      Rate Of Change. Defined as the change between the most recent value and the value 'n' periods back. (Current Value - Value 'n' Periods Ago)/Value 'n' Periods Ago
      Parameters:
      index - bar index
      period - number of bars to look back
      key - bar input key
      instr - instrument
      Returns:
      rate of change for the given parameters
    • std

      Double std(int index, int period, Object key)
      Calculates the Standard Deviation (null is returned if there is not enough data). Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - value key
      Returns:
      standard deviation for the given parameters
    • std

      Double std(int index, int period, Enums.BarInput key, Instrument instr)
      Calculates the Standard Deviation (null is returned if there is not enough data). Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - bar input key
      instr - instrument
      Returns:
      standard deviation for the given parameters
    • sma

      Double sma(int index, int period, Object key)
      Calculates the Simple Moving Average (null is returned if there is not enough data). Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - value key
      Returns:
      Simple Moving Average for the given parameters
    • sma

      Double sma(int index, int period, Enums.BarInput key, Instrument instr)
      Calculates the Simple Moving Average (null is returned if there is not enough data). Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - bar input key
      instr - instrument
      Returns:
      Simple Moving Average for the given parameters
    • wma

      Double wma(int index, int period, Object key)
      Calculates the Weighted Moving Average (null is returned if there is not enough data). Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - value key
      Returns:
      Weighted Moving Average for the given parameters
    • wma

      Double wma(int index, int period, Enums.BarInput key, Instrument instr)
      Calculates the Weighted Moving Average (null is returned if there is not enough data). Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - bar input key
      instr - instrument
      Returns:
      Weighted Moving Average for the given parameters
    • ema

      Double ema(int index, int period, Object key)
      Calculates the Exponential Moving Average. Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - value key
      Returns:
      Exponential Moving Average for the given parameters
    • ema

      Double ema(int index, int period, Enums.BarInput key, Instrument instr)
      Calculates the Exponential Moving Average. Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - bar input key
      instr - instrument
      Returns:
      Exponential Moving Average for the given parameters
    • dema

      Double dema(int index, int period, Object key)
      Calculates the Double Exponential Moving Average (2*EMA - EMA(EMA)). Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - value key
      Returns:
      Double Exponential Moving Average for the given parameters
    • dema

      Double dema(int index, int period, Enums.BarInput key, Instrument instr)
      Calculates the Double Exponential Moving Average (2*EMA - EMA(EMA)). Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - bar input key
      instr - instrument
      Returns:
      Double Exponential Moving Average for the given parameters
    • tema

      Double tema(int index, int period, Object key)
      Calculates the Triple Exponential Moving Average (3*EMA - 3*EMA(EMA) + EMA(EMA(EMA))). Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - value key
      Returns:
      Triple Exponential Moving Average for the given parameters
    • tema

      Double tema(int index, int period, Enums.BarInput key, Instrument instr)
      Calculates the Triple Exponential Moving Average (3*EMA - 3*EMA(EMA) + EMA(EMA(EMA))). Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - bar input key
      instr - instrument
      Returns:
      Triple Exponential Moving Average for the given parameters
    • tma

      Double tma(int index, int period, Object key)
      Calculates the Triangular Moving Average (SMA(SMA)). Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - value key
      Returns:
      Triangular Moving Average for the given parameters
    • tma

      Double tma(int index, int period, Enums.BarInput key, Instrument instr)
      Calculates the Triangular Moving Average (SMA(SMA)). Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - bar input key
      instr - instrument
      Returns:
      Triangular Moving Average for the given parameters
    • mema

      Double mema(int index, int period, Object key)
      Calculates the Modified Exponential Moving Average. Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - value key
      Returns:
      Modified Exponential Moving Average for the given parameters
    • mema

      Double mema(int index, int period, Enums.BarInput key, Instrument instr)
      Calculates the Modified Exponential Moving Average. Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - bar input key
      instr - instrument
      Returns:
      Modified Exponential Moving Average for the given parameters
    • smma

      Double smma(int index, int period, Object key)
      Calculates the Smoothed Moving Average.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - value key
      Returns:
      Smoothed Moving Average for the given parameters
    • smma

      Double smma(int index, int period, Enums.BarInput key, Instrument instr)
      Calculates the Smoothed Moving Average.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - bar input key
      instr - instrument
      Returns:
      Smoothed Moving Average for the given parameters
    • vwma

      Double vwma(int index, int period, Object key)
      Calculates the Volume Weighted Moving Average (null is returned if there is not enough data). Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - value key
      Returns:
      Volume Weighted Moving Average for the given parameters
    • vwma

      Double vwma(int index, int period, Enums.BarInput key, Instrument instr)
      Calculates the Volume Weighted Moving Average (null is returned if there is not enough data). Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - bar input key
      instr - instrument
      Returns:
      Volume Weighted Moving Average for the given parameters
    • kama

      Double kama(int index, int period, Object key)
      Calculates the Kaufmann Adaptive Moving Average (null is returned if there is not enough data). Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - value key
      Returns:
      Kaufmann Adaptive Moving average for the given parameters
    • kama

      Double kama(int index, int period, Enums.BarInput key, Instrument instr)
      Calculates the Kaufmann Adaptive Moving Average (null is returned if there is not enough data). Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - bar input key
      instr - instrument
      Returns:
      Kaufmann Adaptive Moving average for the given parameters
    • kama

      Double kama(int index, int period, double C, Object key)
      Calculates the Kaufmann Adaptive Moving Average (null is returned if there is not enough data). Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      C - constant
      key - value key
      Returns:
      Kaufmann Adaptive Moving average for the given parameters
    • kama

      Double kama(int index, int period, double C, Enums.BarInput key, Instrument instr)
      Calculates the Kaufmann Adaptive Moving Average (null is returned if there is not enough data). Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      C - constant
      key - bar input key
      instr - instrument
      Returns:
      Kaufmann Adaptive Moving average for the given parameters
    • highest

      Double highest(int index, int period, Object key)
      Returns the highest value over the given sequence of values. Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - value key
      Returns:
      highest value (of the given key) between the index and index - period bars
    • lowest

      Double lowest(int index, int period, Object key)
      Returns the lowest value over the given sequence of values. Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - value key
      Returns:
      lowest value (of the given key) between the index and index - period bars
    • highestVisible

      Double highestVisible(Object key)
      Returns the highest value of the visible bars (between getStartIndex() and getEndIndex()). Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      key - value key
      Returns:
      highest value for the given key within the visible bars
    • lowestVisible

      Double lowestVisible(Object key)
      Returns the lowest value of the visible bars (between getStartIndex() and getEndIndex()). Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      key - value key
      Returns:
      lowest value for the given key within the visible bars
    • highest

      Double highest(int index, int period, Enums.BarInput key, Instrument instr)
      Returns the highest value over the given sequence of values. Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - bar input key
      instr - instrument
      Returns:
      highest value (of the given bar input) between the index and index - period bars
    • lowest

      Double lowest(int index, int period, Enums.BarInput key, Instrument instr)
      Returns the lowest value over the given sequence of values. Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - bar input key
      instr - instrument
      Returns:
      lowest value (of the given bar input) between the index and index - period bars
    • lowest

      Double lowest(int index, int period, Enums.BarInput key)
      Returns the lowest value over the given sequence of values. Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to look back
      key - bar input key
      Returns:
      lowest value (of the given key) between the index and index - period bars
    • highestVisible

      Double highestVisible(Enums.BarInput key, Instrument instr)
      Returns the highest value of the visible bars (between getStartIndex() and getEndIndex()). Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      key - bar input key
      instr - instrument
      Returns:
      highest value (of the given bar input) between the start and end index (visible bars)
    • lowestVisible

      Double lowestVisible(Enums.BarInput key, Instrument instr)
      Returns the lowest value of the visible bars (between getStartIndex() and getEndIndex()). Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      key - bar input key
      instr - instrument
      Returns:
      value of the lowest visible bar for the given instrument
    • sum

      Double sum(int index, int period, Object key)
      Returns the sum of the values over the given sequence of values. Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to sum
      key - value key
      Returns:
      sum of values
    • sum

      Double sum(int index, int period, Enums.BarInput key, Instrument instr)
      Returns the sum of the values over the given sequence of values. Null values and values of Double.NaN are ignored in the calculation.
      Parameters:
      index - bar index
      period - number of bars to sum
      key - bar input key
      instr - instrument
      Returns:
      sum of values
    • calcSwingPoints

      List<SwingPoint> calcSwingPoints(boolean top, int strength)
      Calculates and returns a list of swing points of a given strength or greater.
      Parameters:
      top - true if calculating the top swing points
      strength - strength of the swing points
      Returns:
      list of swing points
    • calcSwingPoints

      List<SwingPoint> calcSwingPoints(boolean top, int strength, int maxBars)
      Calculates and returns a list of swing points of a given strength or greater.
      Parameters:
      top - true if calculating the top swing points
      strength - strength of the swing points
      maxBars - maximum number of bars (starting from the latest) to consider
      Returns:
      list of swing points
    • calcSwingPoints

      List<SwingPoint> calcSwingPoints(int strength)
      Calculates and returns a list of swing points of a given strength or greater.
      Parameters:
      strength - strength of the swing points
      Returns:
      list of swing points
    • calcSwingPoints

      List<SwingPoint> calcSwingPoints(int strength, int maxBars)
      Calculates and returns a list of swing points of a given strength or greater.
      Parameters:
      strength - strength of the swing points
      maxBars - maximum number of bars (starting from the latest) to consider
      Returns:
      list of swing points
    • isSignalTriggered

      boolean isSignalTriggered(int index, Object key)
      Checks if the given signal has been triggered for the given bar index.
      Parameters:
      index - bar index
      key - signal key
      Returns:
      true the signal was triggered
    • setSignalTriggered

      void setSignalTriggered(int index, Object key, boolean b)
      Sets the flag indicating that the given signal was triggered for the given bar index. This is called by the framework when a signal is raised. Normally this method would not be used unless you want to trigger multiple signals per bar.
      Parameters:
      index - bar index
      key - signal key
      b - true the signal was triggered
    • isPathBreak

      boolean isPathBreak(int index, Object key)
      Indicates that there is a break in a series of values that is rendered as a path.
    • setPathBreak

      void setPathBreak(int index, Object key, boolean b)
      Indicates that there is a break in a series of values that is rendered as a path.
      Parameters:
      index -
      key -
      b -