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 TypeMethodDescriptionatr
(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)).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.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
getAskClose
(Instrument instr) 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
getAskHigh
(Instrument instr) 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
getAskLow
(Instrument instr) 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
getAskOpen
(Instrument instr) 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.getBarColor
(Object 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
getBidClose
(Instrument instr) 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
getBidHigh
(Instrument instr) 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
getBidLow
(Instrument instr) 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
getBidOpen
(Instrument instr) 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.getBoolean
(Object 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
getClose()
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
getClose
(Instrument instr) 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.Gets the numeric value at the given index specified by the given key.double
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.Gets the numeric value at the given index specified by the given key.getDouble
(Enums.BarInput key, Instrument instr) 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.Gets the numeric value at the given index specified by the given key.float
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.Gets the numeric value at the given index specified by the given key.getFloat
(Enums.BarInput key, Instrument instr) 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
Gets last numeric value (most recent) in the data series specified by the given key.float
getHigh()
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
getHigh
(Instrument instr) 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
Convenience method.int
Convenience method.float
getLow()
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
getLow
(Instrument instr) 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.getNegativeDM
(Instrument instr) Calculates and returns the Negative Directional Movement (-DM) of the latest price bar.float
getOpen()
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
getOpen
(Instrument instr) 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
getOpenInterest
(Instrument instr) 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.getPathColor
(Object key) 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.getPositiveDM
(Instrument instr) 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.getRange()
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.getRange
(Instrument instr) 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.getTrueRange
(Instrument instr) 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.getTypicalPrice
(Instrument instr) 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.Gets the value at the given index associated with the given key.getValue
(Enums.BarInput key, Instrument instr) 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
getVolume
(Instrument instr) 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
getVolumeAsFloat
(Instrument instr) Gets the volume of the latest price bar for the given instrument (as a floating point value).boolean
hasData()
Determines if data is available for the primary instrument in this series.boolean
hasData
(Instrument instr) 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.Returns the highest value over the given sequence of values.highestVisible
(Enums.BarInput key, Instrument instr) Returns the highest value of the visible bars (between getStartIndex() and getEndIndex()).highestVisible
(Object key) 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).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).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.Returns the lowest value over the given sequence of values.lowestVisible
(Enums.BarInput key, Instrument instr) Returns the lowest value of the visible bars (between getStartIndex() and getEndIndex()).lowestVisible
(Object key) 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.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.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
Sets a numeric value at the given index and identifies it using the key.void
Sets a numeric value at the latest index and identifies it using the key.void
Sets a numeric value at the given index and identifies it using the key.void
Sets a numeric value at the latest index and identifies it using the key.void
Convenience method.void
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
setPriceBarColor
(Color color) 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
Sets the value for the given index and key.void
Sets the value for the latest index and key.int
size()
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).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.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).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.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))).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)).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).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).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
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
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 indexinstr
- instrument- Returns:
- the high value of the price bar of the given instrument at the given index.
-
getHigh
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
Gets the high ask value of the price bar for the given instrument at the given index.- Parameters:
index
- bar indexinstr
- instrument- Returns:
- the high ask value of the price bar for the given instrument at the given index.
-
getAskHigh
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
Gets the high bid value of the price bar for the given instrument at the given index.- Parameters:
index
- bar indexinstr
- instrument- Returns:
- the high bid value of the price bar for the given instrument at the given index.
-
getBidHigh
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
Gets the low value of the price bar at the given index for the given instrument.- Parameters:
index
- bar indexinstr
- instrument- Returns:
- the low value of the price bar at the given index for the given instrument.
-
getLow
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
Gets the ask low value of the price bar at the given index.- Parameters:
index
- bar indexinstr
- instrument- Returns:
- the ask low value of the price bar at the given index.
-
getAskLow
Gets the ask low value of the latest price bar.- Parameters:
instr
- instrument- Returns:
- the ask low value of the latest price bar.
-
getBidLow
Gets the bid low value of the price bar at the given index.- Parameters:
index
- bar indexinstr
- instrument- Returns:
- the bid low value of the price bar at the given index.
-
getBidLow
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
Gets the open value of the price bar for the given instrument at the given index.- Parameters:
index
- bar indexinstr
- instrument- Returns:
- the open value of the price bar for the given instrument at the given index.
-
getOpen
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
Gets the open ask value of the price bar for the given instrument at the given index.- Parameters:
index
- bar indexinstr
- instrument- Returns:
- the open ask value of the price bar for the given instrument at the given index.
-
getAskOpen
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
Gets the open bid value of the price bar for the given instrument at the given index.- Parameters:
index
- bar indexinstr
- instrument- Returns:
- the open bid value of the price bar for the given instrument at the given index.
-
getBidOpen
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
Gets the close value of the price bar for the given instrument at the given index.- Parameters:
index
- bar indexinstr
- instrument- Returns:
- the close value of the price bar for the given instrument at the given index.
-
getClose
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
Gets the ask close value of the price bar for the given instrument at the given index.- Parameters:
index
- bar indexinstr
- instrument- Returns:
- the ask close value of the price bar for the given instrument at the given index.
-
getAskClose
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
Gets the close bid value of the price bar for the given instrument at the given index.- Parameters:
index
- bar indexinstr
- instrument- Returns:
- the close bid value of the price bar for the given instrument at the given index.
-
getBidClose
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
Gets the volume of the price bar for the given instrument at the given index.- Parameters:
index
- bar indexinstr
- instrument- Returns:
- the volume of the price bar for the given instrument at the given index.
-
getVolumeAsFloat
Gets the volume of the price bar for the given instrument at the given index (as a floating point value).- Parameters:
index
- bar indexinstr
- instrument- Returns:
- the volume of the price bar for the given instrument at the given index.
-
getVolume
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
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
Gets the open interest of the price bar for the given instrument at the given index.- Parameters:
index
- bar indexinstr
- instrument- Returns:
- the open interest of the price bar for the given instrument at the given index.
-
getOpenInterest
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 indexb
- 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
Indicate the the values stored at the specified index are complete for the specified value key (no further computation is required).- Parameters:
index
- bar indexkey
- value key
-
setComplete
Indicate the the values stored at the specified index are complete for the specified value key (no further computation is required).- Parameters:
index
- bar indexkey
- value keyb
- true if the bar is complete
-
isComplete
Determines if the values stored at the given index are complete (for the specified value key).- Parameters:
index
- bar indexkey
- value key- Returns:
- true if the values stored at the given index are complete (for the specified value key).
-
setDouble
Sets a numeric value at the given index and identifies it using the key.- Parameters:
index
- bar indexkey
- value keyvalue
- value to store at the given index and key
-
setDouble
Sets a numeric value at the latest index and identifies it using the key.- Parameters:
key
- value keyvalue
- double value
-
getDouble
Gets the numeric value at the given index specified by the given key.- Parameters:
index
- bar indexkey
- value key- Returns:
- value assigned to the given index and value key
-
getDouble
Gets the numeric value at the given index specified by the given key for the given instrument.- Parameters:
index
- bar indexkey
- BarInput keyinstr
- instrument- Returns:
- numeric value at the given index specified by the given key for the given instrument
-
getDouble
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 indexkey
- value keydef
- default value to return if no value was found- Returns:
- double value at the given index and key
-
getDouble
Gets the numeric value at the given index specified by the given key.- Parameters:
startTime
- start time of the bar in milliseconds since 1970key
- value key- Returns:
- value at the given bar and key (null if no value)
-
getDouble
Gets the numeric value at the given index specified by the given key.- Parameters:
startTime
- start time of the bar in milliseconds since 1970key
- value keyinstr
- instrument- Returns:
- value at the given bar and key (null if no value)
-
getDouble
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
Gets last numeric value (most recent) in the data series specified by the given key.- Parameters:
key
- input keyinstr
- instrument- Returns:
- most recent number value associated with the given key
-
setFloat
Sets a numeric value at the given index and identifies it using the key.- Parameters:
index
- index of the barkey
- key that identifies the valuevalue
- float value
-
setFloat
Sets a numeric value at the latest index and identifies it using the key.- Parameters:
key
- key that identifies the valuevalue
- float value
-
getFloat
Gets the numeric value at the given index specified by the given key.- Parameters:
index
- bar indexkey
- key that identifies the value- Returns:
- numeric value associated with the given key and index
-
getFloat
Gets the numeric value at the given index specified by the given key.- Parameters:
index
- bar indexkey
- input keyinstr
- instrument- Returns:
- numeric value associated with the given key, index and instrument
-
getFloat
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 indexkey
- input keydef
- default value to return if null- Returns:
- numeric value associated with the given key and instrument (default value if not found)
-
getFloat
Gets the numeric value at the given index specified by the given key.- Parameters:
startTime
- start time of the bar in milliseconds since 1970key
- value key- Returns:
- numeric value associated with the given key and start time
-
getFloat
Gets the numeric value at the given index specified by the given key.- Parameters:
startTime
- milliseconds since 1970key
- bar input keyinstr
- instrument- Returns:
- numeric value associated with the given key, start time and instrument
-
getFloat
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
Gets last numeric value (most recent) in the data series specified by the given key.- Parameters:
key
- value keydef
- default value to return if the value is null- Returns:
- numeric value associated with the given key (latest index)
-
getFloat
Gets last numeric value (most recent) in the data series specified by the given key.- Parameters:
key
- bar input keyinstr
- 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
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 indexkey
- value key- Returns:
- integer value
-
getInt
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
Convenience method. Sets the value at the given index and as an int.- Parameters:
index
- bar indexkey
- value keyval
- value to assign
-
setInt
Convenience method. Sets the value at the latest index and as an int.- Parameters:
key
- value keyval
- integer value
-
setBoolean
Sets the boolean value for the given index and key.- Parameters:
index
- bar indexkey
- value keyvalue
- boolean value to assign
-
setBoolean
Sets the boolean value for the latest index and key.- Parameters:
key
- value keyvalue
- boolean value to assign
-
getBoolean
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
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 keydef
- default value to return- Returns:
- boolean value assigned to the given key at the latest index.
-
getBoolean
Gets the boolean value for the given key at the given index.- Parameters:
index
- bar indexkey
- value key- Returns:
- boolean value assigned to the given key and index
-
getBoolean
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 indexkey
- value keydef
- default value to return if no value is found- Returns:
- boolean value at the given index for the given key
-
setValue
Sets the value for the given index and key.- Parameters:
index
- bar indexkey
- value keyvalue
- value to store
-
setValue
Sets the value for the latest index and key.- Parameters:
key
- value keyvalue
- value to store
-
getValue
Gets the value at the given index associated with the given key.- Parameters:
index
- bar indexkey
- value key- Returns:
- value at the given index and key
-
getValue
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
Gets last value (most recent) in the data series specified by the given key.- Parameters:
key
- bar input keyinstr
- instrument- Returns:
- value of the input key for the given instrument at the latest index.
-
getValue
Gets last value (most recent) in the data series specified by the given key.- Parameters:
index
- bar indexkey
- input keyinstr
- instrument- Returns:
- value of the input key for the given instrument at the given index.
-
setPriceBarColor
Sets the color of the price bar at the given index.- Parameters:
index
- bar indexcolor
- bar color
-
setPriceBarColor
Sets the color of the price bar at the latest index.- Parameters:
color
- bar color
-
getPriceBarColor
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
Sets the color of the bar at the given index.- Parameters:
index
- bar indexkey
- bar key (identifies the bar)color
- bar color
-
setBarColor
Sets the color of the bar at the latest index.- Parameters:
key
- bar key (identifies the bar)color
- bar color
-
getBarColor
Gets the color of the bar at the given index with the given value key.- Parameters:
index
- bar indexkey
- bar key (identifies the bar)- Returns:
- color assigned to the given bar
-
getBarColor
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
Sets the color of the path at the given index.- Parameters:
index
- bar indexkey
- value key (identifies the path)color
- color to assign
-
setPathColor
Sets the color of the path at the latest index.- Parameters:
key
- path key (identifies the path)color
- color to assign
-
getPathColor
Gets the color of the path at the given index.- Parameters:
index
- bar indexkey
- path key (identifies the path)- Returns:
- the color assigned to the path at the given bar index and path key
-
getPathColor
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
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
Calculates and returns the True Range of the price bar at the given index.- Parameters:
index
- bar indexinstr
- instrument- Returns:
- true range for the price bar at the given index and given instrument
-
getTrueRange
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
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
Calculates and returns the Typical Price (TP = (High + Low + Close)/3) of the price bar at the given index.- Parameters:
index
- bar indexinstr
- instrument- Returns:
- typical price for the given bar index and instrument
-
getTypicalPrice
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
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
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
Calculates and returns the range of the price bar at the given index.- Parameters:
index
- bar indexinstr
- 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
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
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
Calculates and returns the Positive Directional Movement (+DM) of the price bar at the given index.- Parameters:
index
- bar indexinstr
- 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
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
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
Calculates and returns the Negative Directional Movement (-DM) of the price bar at the given index.- Parameters:
index
- bar indexinstr
- instrument- Returns:
- negative DM for the given bar index and instrument
-
atr
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
Calculates the average true range based on the most recent complete bars.- Parameters:
period
- number of barsinstr
- instrument- Returns:
- average true range for the given period and instrument
-
atr
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 indexperiod
- number of bars- Returns:
- average true range for the given bar index and period
-
atr
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 indexperiod
- number of barsinstr
- instrument- Returns:
- average true range for the given bar index and period (for the given instrument)
-
ma
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 methodindex
- bar index to start atperiod
- number of barskey
- value key- Returns:
- computed moving average using the given method, index, period and value key
-
ma
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 methodindex
- bar index to start atperiod
- number of barskey
- bar input keyinstr
- instrument- Returns:
- computed moving average using the given method, index, period, bar input and instrument
-
stochasticK
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 indexperiod
- number of barskey
- value key- Returns:
- stochasticK value for the given index, period and value key
-
stochasticK
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 indexperiod
- number of bars- Returns:
- stochasticK value for the given index and period
-
stochasticK
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 indexperiod
- number of barskey
- bar input keyinstr
- instrument- Returns:
- stochasticK value for the given index and period
-
stochasticK
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 indexperiod
- number of barsinstr
- 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
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 indexinstr
- instrument- Returns:
- money flow multiplier for the given bar index and instrument
-
roc
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 indexperiod
- number of bars to look backkey
- value key- Returns:
- rate of change for the given parameters
-
roc
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 indexperiod
- number of bars to look backkey
- bar input keyinstr
- instrument- Returns:
- rate of change for the given parameters
-
std
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 indexperiod
- number of bars to look backkey
- value key- Returns:
- standard deviation for the given parameters
-
std
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 indexperiod
- number of bars to look backkey
- bar input keyinstr
- instrument- Returns:
- standard deviation for the given parameters
-
sma
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 indexperiod
- number of bars to look backkey
- value key- Returns:
- Simple Moving Average for the given parameters
-
sma
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 indexperiod
- number of bars to look backkey
- bar input keyinstr
- instrument- Returns:
- Simple Moving Average for the given parameters
-
wma
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 indexperiod
- number of bars to look backkey
- value key- Returns:
- Weighted Moving Average for the given parameters
-
wma
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 indexperiod
- number of bars to look backkey
- bar input keyinstr
- instrument- Returns:
- Weighted Moving Average for the given parameters
-
ema
Calculates the Exponential Moving Average. Null values and values of Double.NaN are ignored in the calculation.- Parameters:
index
- bar indexperiod
- number of bars to look backkey
- value key- Returns:
- Exponential Moving Average for the given parameters
-
ema
Calculates the Exponential Moving Average. Null values and values of Double.NaN are ignored in the calculation.- Parameters:
index
- bar indexperiod
- number of bars to look backkey
- bar input keyinstr
- instrument- Returns:
- Exponential Moving Average for the given parameters
-
dema
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 indexperiod
- number of bars to look backkey
- value key- Returns:
- Double Exponential Moving Average for the given parameters
-
dema
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 indexperiod
- number of bars to look backkey
- bar input keyinstr
- instrument- Returns:
- Double Exponential Moving Average for the given parameters
-
tema
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 indexperiod
- number of bars to look backkey
- value key- Returns:
- Triple Exponential Moving Average for the given parameters
-
tema
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 indexperiod
- number of bars to look backkey
- bar input keyinstr
- instrument- Returns:
- Triple Exponential Moving Average for the given parameters
-
tma
Calculates the Triangular Moving Average (SMA(SMA)). Null values and values of Double.NaN are ignored in the calculation.- Parameters:
index
- bar indexperiod
- number of bars to look backkey
- value key- Returns:
- Triangular Moving Average for the given parameters
-
tma
Calculates the Triangular Moving Average (SMA(SMA)). Null values and values of Double.NaN are ignored in the calculation.- Parameters:
index
- bar indexperiod
- number of bars to look backkey
- bar input keyinstr
- instrument- Returns:
- Triangular Moving Average for the given parameters
-
mema
Calculates the Modified Exponential Moving Average. Null values and values of Double.NaN are ignored in the calculation.- Parameters:
index
- bar indexperiod
- number of bars to look backkey
- value key- Returns:
- Modified Exponential Moving Average for the given parameters
-
mema
Calculates the Modified Exponential Moving Average. Null values and values of Double.NaN are ignored in the calculation.- Parameters:
index
- bar indexperiod
- number of bars to look backkey
- bar input keyinstr
- instrument- Returns:
- Modified Exponential Moving Average for the given parameters
-
smma
Calculates the Smoothed Moving Average.- Parameters:
index
- bar indexperiod
- number of bars to look backkey
- value key- Returns:
- Smoothed Moving Average for the given parameters
-
smma
Calculates the Smoothed Moving Average.- Parameters:
index
- bar indexperiod
- number of bars to look backkey
- bar input keyinstr
- instrument- Returns:
- Smoothed Moving Average for the given parameters
-
vwma
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 indexperiod
- number of bars to look backkey
- value key- Returns:
- Volume Weighted Moving Average for the given parameters
-
vwma
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 indexperiod
- number of bars to look backkey
- bar input keyinstr
- instrument- Returns:
- Volume Weighted Moving Average for the given parameters
-
kama
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 indexperiod
- number of bars to look backkey
- value key- Returns:
- Kaufmann Adaptive Moving average for the given parameters
-
kama
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 indexperiod
- number of bars to look backkey
- bar input keyinstr
- instrument- Returns:
- Kaufmann Adaptive Moving average for the given parameters
-
kama
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 indexperiod
- number of bars to look backC
- constantkey
- value key- Returns:
- Kaufmann Adaptive Moving average for the given parameters
-
kama
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 indexperiod
- number of bars to look backC
- constantkey
- bar input keyinstr
- instrument- Returns:
- Kaufmann Adaptive Moving average for the given parameters
-
highest
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 indexperiod
- number of bars to look backkey
- value key- Returns:
- highest value (of the given key) between the index and index - period bars
-
lowest
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 indexperiod
- number of bars to look backkey
- value key- Returns:
- lowest value (of the given key) between the index and index - period bars
-
highestVisible
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
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
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 indexperiod
- number of bars to look backkey
- bar input keyinstr
- instrument- Returns:
- highest value (of the given bar input) between the index and index - period bars
-
lowest
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 indexperiod
- number of bars to look backkey
- bar input keyinstr
- instrument- Returns:
- lowest value (of the given bar input) between the index and index - period bars
-
lowest
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 indexperiod
- number of bars to look backkey
- bar input key- Returns:
- lowest value (of the given key) between the index and index - period bars
-
highestVisible
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 keyinstr
- instrument- Returns:
- highest value (of the given bar input) between the start and end index (visible bars)
-
lowestVisible
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 keyinstr
- instrument- Returns:
- value of the lowest visible bar for the given instrument
-
sum
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 indexperiod
- number of bars to sumkey
- value key- Returns:
- sum of values
-
sum
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 indexperiod
- number of bars to sumkey
- bar input keyinstr
- instrument- Returns:
- sum of values
-
calcSwingPoints
Calculates and returns a list of swing points of a given strength or greater.- Parameters:
top
- true if calculating the top swing pointsstrength
- strength of the swing points- Returns:
- list of swing points
-
calcSwingPoints
Calculates and returns a list of swing points of a given strength or greater.- Parameters:
top
- true if calculating the top swing pointsstrength
- strength of the swing pointsmaxBars
- maximum number of bars (starting from the latest) to consider- Returns:
- list of swing points
-
calcSwingPoints
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
Calculates and returns a list of swing points of a given strength or greater.- Parameters:
strength
- strength of the swing pointsmaxBars
- maximum number of bars (starting from the latest) to consider- Returns:
- list of swing points
-
isSignalTriggered
Checks if the given signal has been triggered for the given bar index.- Parameters:
index
- bar indexkey
- signal key- Returns:
- true the signal was triggered
-
setSignalTriggered
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 indexkey
- signal keyb
- true the signal was triggered
-
isPathBreak
Indicates that there is a break in a series of values that is rendered as a path. -
setPathBreak
Indicates that there is a break in a series of values that is rendered as a path.- Parameters:
index
-key
-b
-
-