public interface Quotes extends Iterable<Quote>
The Quotes
are described by an instrument Symbol
, data TimeFrame
and a sequence of prices
accessible using the get(int)
method. Essentially the data is an
array of Quote
's where the index 0
is the last (latest, most
recent) bar and the index length()1
is the first (chronologically
oldest) bar. The Quotes
interface also contains a number of
convenience methods for calculating common statistical and technical
indicators, such as moving averages.
Modifier and Type  Interface and Description 

static interface 
Quotes.FoldingFunction<T>
The function template for the
foldList(FoldingFunction, double) method. 
Modifier and Type  Method and Description 

Series 
accdist()
Gives the Accumulation/Distribution Indicator.

Series 
adosc(int fastPeriod,
int slowPeriod) 
Series 
adx(int periods) 
Quotes 
appendBar(Quote newBar) 
static List<Quote> 
asList(Quotes quotes)
Returns a fixedsize, immutable list backed by the specified
Quotes . 
default Series 
atr(int periods)
Computes the Average True Range indicator.

default Series 
atrp(int periods)
Computes the Average True Range Percentage indicator.

default Series 
averagePrice()
Computes the average price indicator used in technical analysis to
approximate the average price of each bar period.

default Series 
bin() 
default Quotes 
bootstrap()
Performs a time series bootstrapping over this quotes using default
source of randomness.

Quotes 
bootstrap(Random random)
Performs a time series bootstrap with replacement over this quotes using
the specified source of randomness.

default Series 
bop()
Calculates the Balance of Power indicator.

default Series 
bos(int periods) 
Series[] 
cbi(int range)
The Chartmill bull/bear indicator (measuring intrinsic divergence)

default Series 
cci(int periods)
Computes the Commodity Channel Index indicator.

void 
changeRecentQuote(Quote q) 
default Series 
closes()
Returns the series of closing prices from the
Quotes . 
default Series 
clv()
Computes Close Location Value indicator used in technical analysis
to measure where the price of the symbol closes relative to the quote's
high and low.

default Series 
cmo(int periods)
Calculates the Chande Momentum Oscillator used in technical analysis to
determine strength of trends.

Series 
cum() 
default Series 
day() 
default Series 
dayOfWeek() 
default Series 
dayOfYear() 
default Series 
dema(int periods)
Returns the double exponential moving average over the closing prices of
the current
Quotes . 
default Series 
ema(int periods)
Returns the exponential moving average over the closing prices of the
current
Quotes . 
default int 
endOfDay(int barNo) 
Series 
foldList(Quotes.FoldingFunction<Quote> f,
double initialValue) 
Quote 
get(int barNo)
Returns the data series value at the specified position.

default Quote 
getFirst()
Gives the first (chronologically oldest) element in
this . 
default Quote 
getLast()
Gives the last (chronologically newest) element in
this . 
default Series 
getPath(ChronoField field)
Gets a series of values equal to calendar or clock
field of its
corresponding Quote time. 
default Series 
getPath(PriceType price) 
Symbol 
getSymbol()
Gives the
Symbol (i.e. 
default long 
getTimeAt(int barNo)
Gives the timestamp of the bar at the specified
barNo position. 
TimeFrame 
getTimeFrame()
Returns the time frame in which all quotes of this series are represented
(e.g., weekly, daily, hourly...)

default int 
getTimeLocation(LocalDateTime datetime)
Finds the index of the bar with the given date and time.

default int 
getTimeLocation(long epochMicros)
Finds the index of the bar with the given epochmicros timestamp.

TradingHours 
getTradingHours()
Returns the market trading hours.

WhenIterator 
getWhenIterator() 
Quotes 
heikinAshi()
Gives the HeikinAshi series of quotes derived from this quotes.

default Series 
hhv(int periods) 
default Series 
hhvbars(int periods) 
default Series 
highest()
Gives the series of highest values reached by the
highs() from
the beginning to the particular position in the series. 
default Series 
highestSince() 
default Series 
highs()
Returns the series of high prices from the
Quotes . 
default Series 
hour() 
default boolean 
isUndefined(int i)
Returns
true if and only if the specified index is outside of the
data series bounds. 
default Iterator<Quote> 
iterator() 
default Series 
ker(int periods)
Calculates the Kauffman's Efficiency Ratio used in technical analysis to
determine strength of trends.

int 
length()
Gives the number of quotes in this series.

default Series 
llv(int periods) 
default Series 
llvbars(int periods) 
default Series 
lowest()
Gives the series of lowest values reached by the
lows() from the
beginning to the particular position in the series. 
default Series 
lowestSince() 
default Series 
lows()
Returns the series of low prices from the
Quotes . 
default Series 
lri(int periods)
Computes the Linear Regression Indicator, which is the endpoints of the
linear regression trendlines over the specified number of preceding bars.

default Series 
lrs(int periods)
Gives the slope of the linear regression trendlines over the specified
number of preceding bars.

Series 
map(ToDoubleFunction<Quote> f)
Applies the provided function to each element in this series.

default Series 
medianPrice()
Computes the median price indicator used in technical analysis to
approximate the average price of each bar period.

Series 
nvi()
Computes the Negative Volume Index indicator.

default Series 
obv()
Calculates the OnBalance Volume indicator.

static Quotes 
of(Symbol symbol,
TimeFrame timeFrame,
Collection<Quote> list)
Constructs a new
Quotes instance from the specified list of bars. 
static Quotes 
of(Symbol symbol,
TimeFrame timeFrame,
Collection<Quote> list,
TradingHours tradingHours)
Constructs a new
Quotes instance from the specified list of bars. 
static Quotes 
of(Symbol symbol,
TimeFrame timeFrame,
Iterator<Quote> iter)
Constructs a new
Quotes instance from the specified bars sequence. 
static Quotes 
of(Symbol symbol,
TimeFrame timeFrame,
Iterator<Quote> iter,
TradingHours tradingHours)
Constructs a new
Quotes instance from the specified bars sequence. 
default Series 
openInterests()
Returns the series of open interests values from the
Quotes . 
default Series 
opens()
Returns the series of open prices from the
Quotes . 
Series 
pvi()
Computes the Positive Volume Index indicator.

default Series 
qStick(int periods)
Computes the QStick indicator used in technical analysis to
determine strength or weakness of trends.

default Quotes 
randomSlice(Period period)
Gives a random slice from the entire quotes spanning the specified
period of time. 
Series 
rcl()
Calculates the relative close location of the current quote series.

Quotes 
replace(Symbol symbol)
Creates a new
Quotes object by replicating the current
Quotes object and applying a new symbol to it. 
default Series 
rsi(int periods) 
Quotes 
slice(LocalDateTime from,
LocalDateTime to)
Returns the selected range of candlesticks as a new Quotes object.

default Series 
sma(int periods)
Gives the simple moving average of the series, computed by taking the
arithmetic mean over the specified
periods . 
Pair<Quotes,Quotes> 
split(LocalDateTime datetime)
Splits the
Quotes around the provided date and time returning
each partition as a Pair object. 
default int 
startOfDay(int barNo) 
default Series 
stddev(int periods) 
Series 
sts(int periods) 
default Series 
sts(int periods,
int slowingPeriod) 
default Series 
tema(int periods)
Returns the triple exponential moving average over the closing prices of
the current
Quotes . 
default Series 
tma(int periods)
Gives the triangular moving average of the series.

default Quote[] 
toArray() 
List<Quote> 
toList() 
Quotes 
trimToLength(int newLength)
Trims the length of this
Quotes instance to be at most the specified
new length. 
Series 
trueRange()
Gives the normal trading range, high to low, including any gap between
today's high or low and yesterday's close of the underlying bars.

default Series 
tsf(int periods)
Computes the Time Series Forecast, which is the endpoints of the linear
regression trendlines projected forward one bar.

default Series 
typicalPrice()
Computes the typical price indicator used in technical analysis to
approximate the average price of each bar period.

default Series 
vhf(int periods)
Computes the Vertical Horizontal Filter indicator.

default Series 
volumes()
Returns the series of volume values from the
Quotes . 
default Series 
weightedClose()
Computes the weighted close indicator used in technical analysis
to approximate the average price of each bar period.

default Series 
wilders(int periods)
Computes the Wilders Moving Average over the closing prices of
this . 
default Series 
williamsR(int periods)
Computes the Williams %R indicator.

default Series 
wma(double[] weights) 
void 
writeTo(File file) 
void 
writeTo(String filename) 
forEach, spliterator
static Quotes of(Symbol symbol, TimeFrame timeFrame, Collection<Quote> list)
Quotes
instance from the specified list of bars. The
list
must be given in chronological order, i.e. with the oldest bar
given first in the supplied collection.symbol
 the symboltimeFrame
 the time framelist
 the sequence of bars in chronological order, from the oldestQuotes
object of length list.size()
static Quotes of(Symbol symbol, TimeFrame timeFrame, Collection<Quote> list, TradingHours tradingHours)
Quotes
instance from the specified list of bars. The
list
must be given in chronological order, i.e. with the oldest bar
given first in the supplied collection.symbol
 the symboltimeFrame
 the time framelist
 the sequence of bars in chronological order, from the oldestmetaData
 the series meta dataQuotes
object of length list.size()
static Quotes of(Symbol symbol, TimeFrame timeFrame, Iterator<Quote> iter)
Quotes
instance from the specified bars sequence.
The Iterator
must produce bars in chronological order, i.e. with the
oldest bar given first in the supplied bar sequence.symbol
 the symboltimeFrame
 the time frameiter
 the sequence of bars in chronological order, from the oldestQuotes
object of length stream.count()
static Quotes of(Symbol symbol, TimeFrame timeFrame, Iterator<Quote> iter, TradingHours tradingHours)
Quotes
instance from the specified bars sequence.
The Iterator
must produce bars in chronological order, i.e. with the
oldest bar given first in the supplied bar sequence.symbol
 the symboltimeFrame
 the time frameiter
 the sequence of bars in chronological order, from the oldestmetaData
 the series meta dataQuotes
object of length stream.count()
Quotes heikinAshi()
The HeikinAshi bars are computed using the open, high, low and close
prices.
The HeikinAshi bar close is an average of the current bar open, high,
low and close. The HeikinAshi bar open is an average of the prior
HeikinAshi bar open and the prior HeikinAshi bar close. The HeikinAshi
bar high is a maximum of the current bar high, the current HeikinAshi
bar open and the current HeikinAshi bar close. The HeikinAshi bar low
is a minimum of the current bar low, the current HeikinAshi bar open and
the current HeikinAshi bar close.
n
, where
n
is the length of this
default Quotes bootstrap()
The method utilizes the drawing with replacement idea.
The generated quotes have the same length
and
TimeFrame
as this series.
The generated quotes have an artificial Symbol
created with no
specified DataProvider
and with the original name prepended with
a tilde character. For example a tradeable symbol "EURUSD"
will have a bootstrap symbol "~EURUSD".
Code examples
Use the following code to obtain a single bootstrap series for the given
quotes
:
Quotes newSample = quotes.bootstrap();
Use the following code to obtain an infinite stream of bootstrap series
for the given quotes
:
Stream<Quotes> newSamples = Stream.generate(quotes::bootstrap());
When having the set of quotes with different symbols, use the following code to replace each quotes with its bootstrap at one single step:
Collection<Quotes> marketData = ...
marketData.replaceAll(Quotes::bootstrap);
When deterministic randomization strategy is required, use an externally seeded random generator (not recommended in normal case, since statistical value of bootstrap methods usually depend on large number of undeterministic samples):
long seed = ...
Random rand = new Random(seed);
... = quotes.bootstrap(rand);
Quotes bootstrap(Random random)
See bootstrap()
for additional information.
random
 the source of randomness to usedefault Quote[] toArray()
Pair<Quotes,Quotes> split(LocalDateTime datetime)
Quotes
around the provided date and time returning
each partition as a Pair
object.
The chronologically older partition of bars is returned in the
left
element of the result. The chronologically newer bars  in
the right
element. If a bar with the exact datetime
exists it is included in the right
element.
datetime
 the date and time of the bar around which to splitdatetime
Quotes slice(LocalDateTime from, LocalDateTime to)
from
 the start datetime of the sliced periodto
 the end datetime of the sliced periodQuotes trimToLength(int newLength)
Quotes
instance to be at most the specified
new length. The result will contain the most recent bars, while the oldest
bars will be dropped from the result. An application can use this operation
to minimize the storage of a Quotes
instance. If the current length
is already less than or equal to the specified target length, the method
simply returns this
instance.newLength
 the target dataset length in barsQuotes
with target length or shorterdefault Quotes randomSlice(Period period)
period
of time.period
 a dailygrained length of time to be included in the resultperiod
Quote get(int barNo) throws IndexOutOfBoundsException
barNo
 the index to get the value atbarNo
IndexOutOfBoundsException
 (possibly an instance of
ArrayIndexOutOfBoundsException
) if the index
barNo
is outside of the range of this series, i.e. either
< 0
or >= this.length()
default long getTimeAt(int barNo) throws IndexOutOfBoundsException
barNo
position.
The method is equivalent to:
this.get(barNo).time
barNo
 the index for which to get the time pointIndexOutOfBoundsException
 (possibly an instance of
ArrayIndexOutOfBoundsException
) if the index
barNo
is outside of the range of this series, i.e. either
< 0
or >= this.length()
WhenIterator getWhenIterator()
default Quote getFirst()
this
.length()  1
IndexOutOfBoundsException
 if this data series is emptydefault Quote getLast()
this
.0
IndexOutOfBoundsException
 if this data series is emptySymbol getSymbol()
Symbol
(i.e. instrument) associated with this
Quotes
.TimeFrame getTimeFrame()
By default all methods declared on this object, returning the
Series
object, give the Series
result with the exact same
time frame.
TimeFrame
of this data seriesSeries.getTimeFrame()
int length()
this
series lengthdefault Series getPath(ChronoField field)
field
of its
corresponding Quote
time.
For example the following code calculates and returns the series with day of
month (131) of the quotes. The length of returned Series
is the same
as the length of this
.
quotes.getPath(ChronoField.DAY_OF_MONTH)More examples:
quotes.getPath(ChronoField.DAY_OF_MONTH) 
Returns the series with day of month (131) 
quotes.getPath(ChronoField.DAY_OF_WEEK) 
Returns the series with day of week (17). The DayOfWeek class can be used to interpret the
result. 
field
 the standard calendar or clock field to watch fordefault Series day()
default Series dayOfWeek()
default Series dayOfYear()
default Series hour()
default Series sma(int periods)
periods
.
The simple moving average is commonly abbreviated as SMA. See
Series.sma(int)
for more details.
The method is effectively equivalent to, for this
quotes:
this.closes().sma(periods)
periods
 the moving average periodthis.length()periods+1
IllegalArgumentException
 if the periods
argument is not positiveSeries.sma(int)
Series pvi()
The Positive Volume Index indicator is often abbreviated as PVI.
The PVI is a trend indicator developed by Paul Dysart and later
popularized by Norman Fosback.
The PVI is computed using the closing prices and the volume. By
definition the PVI values does not change on bars where trading volume is
lower or equal compared with the previous bar, otherwise the values
change cumulatively by the current bar's Percent Price Change.
this.length()
Series nvi()
The Negative Volume Index indicator is often abbreviated as NVI.
The NVI is a trend indicator developed by Paul Dysart and later
popularized by Norman Fosback.
The NVI is computed using the closing prices and the volume. By
definition the NVI values does not change on bars where trading volume is
greater or equal compared with the previous bar, otherwise the values
change cumulatively by the current bar's Percent Price Change.
this.length()
default Series ema(int periods)
Quotes
.
The exponential moving average is commonly abbreviated as EMA. See
Series.ema(int)
for more details.
The method is effectively equivalent to, for this
quotes:
this.closes().ema(periods)
periods
 the moving average periodthis.length()periods+1
default Series dema(int periods)
Quotes
.
The double exponential moving average is commonly abbreviated as DEMA.
See Series.dema(int)
for more information about this
average.
The method is effectively equivalent to, for this
quotes:
this.closes().dema(periods)
periods
 the moving average periodthis.length()  2*periods + 2
Series.dema(int)
default Series tema(int periods)
Quotes
.
The triple exponential moving average is commonly abbreviated as TEMA.
See Series.tema(int)
for more information about this
average.
The method is effectively equivalent to, for this
quotes:
this.closes().tema(periods)
periods
 the moving average periodthis.length()  3*periods + 3
Series.tema(int)
default Series tma(int periods)
The triangular moving average is sometimes abbreviated as TMA.
See the Series.tma(int)
method for more information about this
indicator. The TMA is calculated using the closing prices only. The
method is equivalent to, for this
quotes:
this.closes().tma(periods)
periods
 the number of bars consisting the indicator averaging periodn  periods + 1
, where
n
is the length of this
seriesdefault Series wilders(int periods)
this
.
This method is equivalent to closes().wilders(periods)
. See
Series.wilders(int)
for additional information.
periods
 the moving average smoothing parameternperiods+1
,
where n
is the length of this
seriesdefault Series williamsR(int periods)
The Williams %R is a momentum oscillator.
The Williams %R was developed by Larry Williams.
The Williams %R is sometimes shortened as %R.
The Williams %R is computed using high, low and close prices of the
Quotes
.
The Williams %R values fluctuate between 0
and 100
. The
indicator values shows how the closing price of an instrument relates to
the highest high and the lowest low prices over a given number of
lookback bars. The extreme values of the indicator above 20 indicate
overbough market conditions, while values below 80 indicate oversold
market conditions.
periods
 the number of lookback bars included in calculation of each data pointnperiods+1
, where n
is the length of
this
seriesdefault Series vhf(int periods)
The Vertical Horizontal Filter is sometimes abbreviated as VHF.
The VHF is a trend indicator developed by Adam White.
The VHF is computed using closing prices only. See the method
Series.vhf(int)
for more information about this indicator.
The method is equivalent to, for the quotes x
:
x.closes().vhf(periods)
periods
 the number of lookback bars to be included in each value
calculationn  periods + 1
, where
n
is the length of this
seriesdefault Series cci(int periods)
The Commodity Channel Index is commonly abbreviated as CCI.
The CCI is a momentum indicator that measures a variation of an
instrument's prices from the statistical mean.
The CCI was developed by Donald Lambert.
The CCI is computed using high, low and close prices of the
Quotes
. The method is effectively equivalent to, for the
instrument's quotes x
:
x.typicalPrice().cci(periods)
periods
 the number of lookback bars included in calculation of each
data pointnperiods+1
,
where n
is the length of this
seriesdefault Series obv()
The OnBalance Volume in commonly abbreviated as OBV.
The OBV was developed by Joseph Granville.
The OBV is calculated using the volume and the direction of a bars body.
n
, where
n
is the length of this
Series accdist()
Accumulation/Distribution Technical Indicator is determined by the changes in price and volume. The volume acts as a weighting coefficient at the change of price  the higher the coefficient (the volume) is, the greater the contribution of the price change (for this period of time) will be in the value of the indicator.
In fact, this indicator is a variant of the more commonly used indicator On Balance Volume. They are both used to confirm price changes by means of measuring the respective volume of sales.
When the Accumulation/Distribution indicator grows, it means accumulation (buying) of a particular security, as the overwhelming share of the sales volume is related to an upward trend of prices. When the indicator drops, it means distribution (selling) of the security, as most of sales take place during the downward price movement.
Divergences between the Accumulation/Distribution indicator and the price of the security indicate the upcoming change of prices. As a rule, in case of such divergences, the price tendency moves in the direction in which the indicator moves. Thus, if the indicator is growing, and the price of the security is dropping, a turnaround of price should be expected.
Series adosc(int fastPeriod, int slowPeriod)
Series cum()
default Series bin()
Series map(ToDoubleFunction<Quote> f)
The function application result is returned as a new Series
object with preserved indexation order of elements.
f
 the function to be applied to each Quote
in this
Quotes
NullPointerException
 if f
is null
Series foldList(Quotes.FoldingFunction<Quote> f, double initialValue)
default Series weightedClose()
The weighted close is sometimes abbreviated as WC.
The WC is a statistical indicator.
The WC is calculated using high, low and close prices.
The WC is similar to typicalPrice()
but places greater weighting
on close price. It may be used in custom calculations as a replacement
for closes()
. The returned time series length matches exactly
this quote's length()
.
The method is effectively equivalent to:
this.map(Quote::weightedClose);
(2*C + H + L)/4
) of each corresponding quotetypicalPrice()
,
medianPrice()
,
Quote.weightedClose()
default Series averagePrice()
The average price is a statistical indicator.
The average price is calculated using open, high, low and close prices.
The average price may be used in custom calculations as a replacement for
closes()
. The returned time series length matches exactly this
quote's length()
.
The default implementation is equivalent to, for this quotes
:
quotes.map(Quote::averagePrice);
medianPrice()
,
typicalPrice()
,
weightedClose()
,
Quote.averagePrice()
default Series typicalPrice()
The typical price is a statistical indicator.
The typical price is calculated using high, low and close prices.
The typical price may be used in custom calculations as a replacement for
closes()
. The returned time series length matches exactly this
quote's length()
.
The default implementation is equivalent to, for this quotes
:
quotes.map(Quote::typicalPrice);
medianPrice()
,
weightedClose()
,
Quote.typicalPrice()
default Series medianPrice()
The median price is a statistical indicator.
The median price is calculated using high and low prices.
The median price may be used in custom calculations as a replacement for
closes()
. The returned time series length matches exactly this
quote's length()
.
The default implementation is equivalent to, for this quotes
:
quotes.map(Quote::medianPrice);
typicalPrice()
,
Quote.medianPrice()
default Series clv()
The Close Location Value is commonly abbreviated as CLV.
The CLV is a trend indicator.
The CLV ranges between 1 and +1.
The CLV is computed using high, low and close prices.
The closer the close price is to the high the closer the indicator value
is to 1. The closer the close price is to the low the closer the
indicator value is to 1.
The method is effectively equivalent to:
this.map((Quote q) > ((q.close  q.low)  (q.high  q.close))/(q.high  q.low));
this.length()
containing
indicator values between 1 and +1.default Series cmo(int periods)
The Chande Momentum Oscillator is calculated using closing prices
only.
The method is effectively equivalent to, for the series x
:
x.closes().cmo(periods)
See Series.cmo(int)
method for more information about this
indicator.
periods
 the number of elements in a moving window used in the
calculationthis.length()periods
IllegalArgumentException
 if the periods
is not positiveSeries.cmo(int)
default Series ker(int periods)
The Kauffman's Efficiency Ratio is calculated using closing prices
only.
The method is effectively equivalent to, for the series x
:
x.closes().ker(periods)
See Series.ker(int)
method for more information about this
indicator.
periods
 the number of elements in a moving window used in the
calculationthis.length()periods
IllegalArgumentException
 if the periods
is not positivecmo(int)
,
Series.ker(int)
default Series qStick(int periods)
The QStick is a statistical indicator.
The QStick was developed by Tushar Chande.
The QStick is computed using the open and close prices.
The positive value indicates that the majority of the last n
bars
are bullish
, while a negative value means the
majority of that bars are bearish
.
The method is effectively equivalent to:
this.map((Quote q) > (q.close  q.open)).sma(periods);
periods
 the moving average periodthis.length()periods+1
with simple moving average of the differences between the open
and close prices of the underlying barsdefault Series opens()
Quotes
.
The returned series has length this.length()
.
The returned series has exceptional behavior of the
Series.ref(int)
method, allowing for opens.ref(1)
call
and thus effectively allowing to peek into the nearest future open price.
This feature is particularly useful for development of some userdesigned
strategies or trading systems, see the Trading System Builder's
Manual for more information. The quotes.opens().ref(1)
exhibits the following behavior:
opens.ref(1)
has the same length as the opens
series
opens.ref(1).get(barNo)
equals to
opens.get(barNo1)
, which is equivalent to
quotes.get(barNo1).open
opens.ref(1).get(0)
equals to
quotes.get(0).close
, where quotes
is the bar sequence
from which the opens
series was derived.
ref(1)
method behavior, this method is
equivalent to:
this.map(q > q.open)
default Series highs()
Quotes
.
The returned series has length this.length()
.
The method is equivalent to, for this
quotes:
this.map(q > q.high)
default Series lows()
Quotes
.
The returned series has length this.length()
.
The method is equivalent to, for this
quotes:
this.map(q > q.low)
default Series closes()
Quotes
.
The returned series has length this.length()
.
The method is equivalent to, for this
quotes:
this.map(q > q.close)
default Series volumes()
Quotes
.
The returned series has length this.length()
.
The method is equivalent to, for this
quotes:
this.map(q > q.volume)
default Series openInterests()
Quotes
.
The returned series has length this.length()
.
The method is equivalent to, for this
quotes:
this.map(q > q.openInterest)
default Series rsi(int periods)
Series trueRange()
The True Range is a volatility indicator developed by Welles Wilder.
The indicator is computed using high, low and close prices.
The trading range is measured as an absolute price difference (not in a
percentage change).
this.length()1
with
maximum difference between the current high, low and previous
close pricesatr(int)
Series rcl()
Series[] cbi(int range)
default Series atr(int periods)
The Average True Range is commonly abbreviated as ATR.
The ATR is a volatility indicator developed by Welles Wilder.
The ATR is computed using high, low and close prices.
The method is effectively equivalent to, for this
series:
this.trueRange().wilders(periods)
periods
 the indicator averaging periodthis.length()periods+1
with the Wilder's moving average of the true rangeIllegalArgumentException
 if periods
parameter is not positiveatrp(int)
,
trueRange()
default Series atrp(int periods)
The Average True Range Percentage is commonly abbreviated as ATRP.
The ATRP is a volatility indicator.
The ATRP is computed using high, low and close prices.
The ATRP is very similar to the Average True Range
except that the ATRP is normalized to express percentage of recent price
variation in the range between 0
and 100
, while the
Average True Range gives volatility in absolute price variation.
periods
 the indicator averaging periodthis.length()periods+1
with the Wilder's moving average of the true range percentIllegalArgumentException
 if periods
parameter is not positivedefault Series llv(int periods)
default Series hhv(int periods)
default Series highest()
highs()
from
the beginning to the particular position in the series.
The first
element of the result is equal to
this.getFirst().high
and this.highs().getFirst()
.
The last
element of the result is equal to
this.highs().max()
.
Each subsequent element of the result is never lower than the previous
one.
The method is effectively equivalent to:
this.highs().highest()
n
, where n
is the length of
this
lowest()
,
hhv(int)
,
Series.highest()
default Series highestSince()
default Series lowest()
lows()
from the
beginning to the particular position in the series.
The first
element of the result is equal to
this.getFirst().low
and this.lows().getFirst()
.
The last
element of the result is equal to
this.lows().min()
.
Each subsequent element of the result is never higher than the previous
one.
The method is effectively equivalent to:
this.lows().lowest()
n
, where n
is the length of
this
highest()
,
llv(int)
,
Series.lowest()
default Series lowestSince()
default Series llvbars(int periods)
default Series hhvbars(int periods)
default Series lri(int periods)
The Linear Regression Indicator is sometimes abbreviated as LRI.
The LRI is a trend indicator.
The LRI is computed using the close prices.
The method is effectively equivalent to, for this
quotes:
this.closes().lri(periods);
periods
 the number of bars to build a trendlinelenperiods+1
, where len
is
the length of this
default Series lrs(int periods)
The Linear Regression Slope is sometimes abbreviated as LRS.
The LRS is a trend indicator.
The LRS is computed using the close prices.
The method is effectively equivalent to, for this
quotes:
this.closes().lrs(periods);
periods
 the number of bars to build a trendlinelenperiods+1
, where len
is
the length of this
default Series tsf(int periods)
The Time Series Forecast is commonly abbreviated as TSF.
The TSF is a trend indicator.
The TSF is computed using the close prices.
The method is effectively equivalent to, for this
quotes:
this.closes().tsf(periods);
periods
 the number of bars to build a trendlinelenperiods+1
, where len
is
the length of this
default Series wma(double[] weights)
default boolean isUndefined(int i)
true
if and only if the specified index is outside of the
data series bounds. Which means it's either negative or greater than or equal
to the series length.
In other words the method gives true
whenever calling
get(int)
with the specified index, would raised an
IndexOutOfBoundsException
.
i
 the index to checktrue
if the index is out of series boundsvoid writeTo(String filename) throws IOException
IOException
void writeTo(File file) throws IOException
IOException
default Series stddev(int periods)
default Series bos(int periods)
default Series sts(int periods, int slowingPeriod)
Series sts(int periods)
default Series bop()
The Balance of Power is commonly abbreviated as BOP.
The BOP was introduced by Igor Livshin.
The BOP measures the market strength of buyers against sellers by
assessing the ability of each side to drive prices to an extreme
level.
The BOP computes raw values for each bar independently using open, high,
low and close prices.
The BOP result can be smoothed using any moving average type.
The method is equivalent to:
this.map(q > (q.close  q.open)/(q.high  q.low))
n
, where the
n
is the length of this
Series adx(int periods)
default int startOfDay(int barNo)
default int endOfDay(int barNo)
default int getTimeLocation(LocalDateTime datetime)
The method is equivalent to, for this
quotes:
this.findIndex(Chronological.toEpochMicros(datetime))
datetime
 the date and time to locatedefault int getTimeLocation(long epochMicros)
epochMicros
 the date and time to locate, represented as a number of
microseconds since the epochstatic List<Quote> asList(Quotes quotes)
Quotes
.
This method acts as a bridge between Quotes
instances and
standard Java collectionbased APIs, in combination with
#of(Symbol, TimeFrame, List)
. The returned list implements
RandomAccess
and is serializable if only the given quotes
are serializable.
quotes
 the data series by which the list will be backedvoid changeRecentQuote(Quote q)
Quotes replace(Symbol symbol)
Quotes
object by replicating the current
Quotes
object and applying a new symbol to it.symbol
 the symbol for the new Quotes
.Quotes
object.TradingHours getTradingHours()
Copyright © 2017 SoftIgnition, Chartsy One. All Rights Reserved.