public interface IHistory
The IHistory interface represents API for historical data access.
| Method Summary | |
|---|---|
IBar |
getBar(Instrument instrument,
Period period,
OfferSide side,
int shift)
Returns bar for specified instrument, period and side, that is shifted back in time for number in bars specified in shift
parameter, 0 - current bar (currently generated from ticks), 1 - previous bar (last formed bar) If there is no bar loaded at that
position, then function returns null. |
java.util.List<IBar> |
getBars(Instrument instrument,
Period period,
OfferSide side,
Filter filter,
int numberOfCandlesBefore,
long time,
int numberOfCandlesAfter)
Returns bars for specified instrument, period and side. |
java.util.List<IBar> |
getBars(Instrument instrument,
Period period,
OfferSide side,
Filter filter,
long from,
long to)
Returns bars for specified instrument, period, side and filter. |
java.util.List<IBar> |
getBars(Instrument instrument,
Period period,
OfferSide side,
long from,
long to)
Returns bars for specified instrument, period and side. |
long |
getBarStart(Period period,
long time)
Returns starting time of the bar that includes time specified in time parameter |
double |
getEquity()
Returns current equity calculated for every tick |
ITimedData |
getFeedData(IFeedDescriptor feedDescriptor,
int shift)
Returns bar for specified feed descriptor, that is shifted back in time for number in bars specified in shift
parameter, 0 - current bar (currently generated), 1 - previous bar (last formed bar) If there is no bar loaded at that
position, then function returns null. |
java.util.List<ITimedData> |
getFeedData(IFeedDescriptor feedDescriptor,
int numberOfFeedBarsBefore,
long time,
int numberOfFeedBarsAfter)
Returns bars for specified feedDescriptor. |
java.util.List<ITimedData> |
getFeedData(IFeedDescriptor feedDescriptor,
long from,
long to)
Returns bars for specified feed descriptor. |
IOrder |
getHistoricalOrderById(java.lang.String id)
Returns historical (closed) order by position id for the given user account. |
ITick |
getLastTick(Instrument instrument)
Returns last tick for specified instrument |
long |
getNextBarStart(Period period,
long barTime)
Returns starting time of the bar next to the bar that includes time specified in barTime parameter |
java.util.List<IOrder> |
getOrdersHistory(Instrument instrument,
long from,
long to)
Returns orders for specified instrument and time interval. |
IPointAndFigure |
getPointAndFigure(Instrument instrument,
OfferSide offerSide,
PriceRange boxSize,
ReversalAmount reversalAmount,
int shift)
Returns Point and Figure for specified instrument, offer side, box size and reversal amount, that is shifted back in time for number in bars specified in shift
parameter, 0 - current bar, 1 - previous bar (last formed bar) If there is no bar loaded at that
position, then function returns null. |
java.util.List<IPointAndFigure> |
getPointAndFigures(Instrument instrument,
OfferSide offerSide,
PriceRange boxSize,
ReversalAmount reversalAmount,
int numberOfBarsBefore,
long time,
int numberOfBarsAfter)
Returns Point and Figures for specified instrument, offer side, box size and reversal amount. |
java.util.List<IPointAndFigure> |
getPointAndFigures(Instrument instrument,
OfferSide offerSide,
PriceRange boxSize,
ReversalAmount reversalAmount,
long from,
long to)
Returns Point and Figures for specified instrument, offer side, box size and reversal amount. |
long |
getPreviousBarStart(Period period,
long barTime)
Returns starting time of the bar previous to the bar that includes time specified in barTime parameter |
IRangeBar |
getRangeBar(Instrument instrument,
OfferSide offerSide,
PriceRange priceRange,
int shift)
Returns range bar for specified instrument, offer side and price range, that is shifted back in time for number in bars specified in shift
parameter, 0 - current bar, 1 - previous bar (last formed bar) If there is no bar loaded at that
position, then function returns null. |
java.util.List<IRangeBar> |
getRangeBars(Instrument instrument,
OfferSide offerSide,
PriceRange priceRange,
int numberOfBarsBefore,
long time,
int numberOfBarsAfter)
Returns Range Bars for specified instrument, offer side and price range. |
java.util.List<IRangeBar> |
getRangeBars(Instrument instrument,
OfferSide offerSide,
PriceRange priceRange,
long from,
long to)
Returns Range Bars for specified instrument, offer side and price range. |
IRenkoBar |
getRenkoBar(Instrument instrument,
OfferSide offerSide,
PriceRange brickSize,
int shift)
Returns renko bar for specified instrument, offer side and brick size, that is shifted back in time for number in bars specified in shift
parameter, 0 - current bar, 1 - previous bar (last formed bar) If there is no bar loaded at that
position, then function returns null. |
java.util.List<IRenkoBar> |
getRenkoBars(Instrument instrument,
OfferSide offerSide,
PriceRange brickSize,
int numberOfBarsBefore,
long time,
int numberOfBarsAfter)
Returns Renko Bars for specified instrument, offer side and brick size. |
java.util.List<IRenkoBar> |
getRenkoBars(Instrument instrument,
OfferSide offerSide,
PriceRange brickSize,
long from,
long to)
Returns Renko Bars for specified instrument, offer side and brick size. |
long |
getStartTimeOfCurrentBar(Instrument instrument,
Period period)
Returns starting time of the current bar (bar currently generated from ticks) for specified instrument and period. |
ITick |
getTick(Instrument instrument,
int shift)
Returns tick for specified instrument, that is shifted back in time for number in ticks specified in shift
parameter, 0 - current tick, 1 - previous tick. |
ITickBar |
getTickBar(Instrument instrument,
OfferSide offerSide,
TickBarSize tickBarSize,
int shift)
Returns tick bar for specified instrument, offer side and tick bar size, that is shifted back in time for number in bars specified in shift
parameter, 0 - current bar, 1 - previous bar (last formed bar) If there is no bar loaded at that
position, then function returns null. |
java.util.List<ITickBar> |
getTickBars(Instrument instrument,
OfferSide offerSide,
TickBarSize tickBarSize,
int numberOfBarsBefore,
long time,
int numberOfBarsAfter)
Returns Tick Bars for specified instrument, offer side and tick bar size. |
java.util.List<ITickBar> |
getTickBars(Instrument instrument,
OfferSide offerSide,
TickBarSize tickBarSize,
long from,
long to)
Returns Tick Bars for specified instrument, offer side and tick bar size. |
java.util.List<ITick> |
getTicks(Instrument instrument,
int numberOfOneSecondIntervalsBefore,
long time,
int numberOfOneSecondIntervalsAfter)
Returns ticks for specified instrument, time and count. |
java.util.List<ITick> |
getTicks(Instrument instrument,
long from,
long to)
Returns ticks for specified instrument and time interval. |
long |
getTimeForNBarsBack(Period period,
long to,
int numberOfBars)
Returns starting time of the bar that is numberOfBars - 1 back in time to the bar that includes time specified in
to parameter. |
long |
getTimeForNBarsForward(Period period,
long from,
int numberOfBars)
Returns starting time of the bar that is + numberOfBars - 1 in the future to the bar that includes time specified in
from parameter. |
long |
getTimeOfLastTick(Instrument instrument)
Returns time of last tick received for specified instrument. |
void |
readBars(Instrument instrument,
Period period,
OfferSide side,
Filter filter,
int numberOfCandlesBefore,
long time,
int numberOfCandlesAfter,
LoadingDataListener barListener,
LoadingProgressListener loadingProgress)
Reads bars from the local cache in the background. |
void |
readBars(Instrument instrument,
Period period,
OfferSide side,
Filter filter,
long from,
long to,
LoadingDataListener barListener,
LoadingProgressListener loadingProgress)
Reads bars from the local cache in the background. |
void |
readBars(Instrument instrument,
Period period,
OfferSide side,
long from,
long to,
LoadingDataListener barListener,
LoadingProgressListener loadingProgress)
Reads bars from the local cache in the background. |
void |
readFeedData(IFeedDescriptor feedDescriptor,
int numberOfFeedDataBefore,
long time,
int numberOfFeedDataAfter,
IFeedListener feedListener,
LoadingProgressListener loadingProgress)
Reads feed data from the local cache in the background. |
void |
readFeedData(IFeedDescriptor feedDescriptor,
long from,
long to,
IFeedListener feedListener,
LoadingProgressListener loadingProgress)
Reads feed data from the local cache in the background. |
void |
readOrdersHistory(Instrument instrument,
long from,
long to,
LoadingOrdersListener ordersListener,
LoadingProgressListener loadingProgress)
Loads orders from the server in the background. |
void |
readPointAndFigures(Instrument instrument,
OfferSide offerSide,
PriceRange boxSize,
ReversalAmount reversalAmount,
int numberOfBarsBefore,
long time,
int numberOfBarsAfter,
IPointAndFigureFeedListener listener,
LoadingProgressListener loadingProgress)
Reads Point and Figures from the local cache in the background. |
void |
readPointAndFigures(Instrument instrument,
OfferSide offerSide,
PriceRange boxSize,
ReversalAmount reversalAmount,
long from,
long to,
IPointAndFigureFeedListener listener,
LoadingProgressListener loadingProgress)
Reads Point and Figures from the local cache in the background. |
void |
readRangeBars(Instrument instrument,
OfferSide offerSide,
PriceRange priceRange,
int numberOfBarsBefore,
long time,
int numberOfBarsAfter,
IRangeBarFeedListener listener,
LoadingProgressListener loadingProgress)
Reads Range Bars from the local cache in the background. |
void |
readRangeBars(Instrument instrument,
OfferSide offerSide,
PriceRange priceRange,
long from,
long to,
IRangeBarFeedListener listener,
LoadingProgressListener loadingProgress)
Reads Range Bars from the local cache in the background. |
void |
readRenkoBars(Instrument instrument,
OfferSide offerSide,
PriceRange brickSize,
int numberOfBarsBefore,
long time,
int numberOfBarsAfter,
IRenkoBarFeedListener listener,
LoadingProgressListener loadingProgress)
Reads Renko Bars from the local cache in the background. |
void |
readRenkoBars(Instrument instrument,
OfferSide offerSide,
PriceRange brickSize,
long from,
long to,
IRenkoBarFeedListener listener,
LoadingProgressListener loadingProgress)
Reads Renko Bars from the local cache in the background. |
void |
readTickBars(Instrument instrument,
OfferSide offerSide,
TickBarSize tickBarSize,
int numberOfBarsBefore,
long time,
int numberOfBarsAfter,
ITickBarFeedListener listener,
LoadingProgressListener loadingProgress)
Reads Tick Bars from the local cache in the background. |
void |
readTickBars(Instrument instrument,
OfferSide offerSide,
TickBarSize tickBarSize,
long from,
long to,
ITickBarFeedListener listener,
LoadingProgressListener loadingProgress)
Reads Tick Bars from the local cache in the background. |
void |
readTicks(Instrument instrument,
int numberOfOneSecondIntervalsBefore,
long time,
int numberOfOneSecondIntervalsAfter,
LoadingDataListener tickListener,
LoadingProgressListener loadingProgress)
Reads ticks from the local cache in the background. |
void |
readTicks(Instrument instrument,
long from,
long to,
LoadingDataListener tickListener,
LoadingProgressListener loadingProgress)
Reads ticks from the local cache in the background. |
| Method Detail |
|---|
long getTimeOfLastTick(Instrument instrument)
throws JFException
instrument - instrument of the tick
JFException - when instrument is not active (not opened in platform)
ITick getLastTick(Instrument instrument)
throws JFException
instrument - instrument of the tick
JFException - when instrument is not active (not opened in platform)
long getStartTimeOfCurrentBar(Instrument instrument,
Period period)
throws JFException
instrument - instrument of the barperiod - period of the bar
JFException - when period is not supported or instrument is not active (not opened in platform)
IBar getBar(Instrument instrument,
Period period,
OfferSide side,
int shift)
throws JFException
shift
parameter, 0 - current bar (currently generated from ticks), 1 - previous bar (last formed bar) If there is no bar loaded at that
position, then function returns null.
instrument - instrument of the barperiod - period of the barside - bid or ask side of the barshift - number of candle back in time staring from current bar. 1 - previous bar, 2 - current bar minus 2 bars and so on
JFException - when period is not supported or instrument is not active (not opened in platform)
void readTicks(Instrument instrument,
long from,
long to,
LoadingDataListener tickListener,
LoadingProgressListener loadingProgress)
throws JFException
tickListener. LoadingProgressListener is
used to receive feedback about loading progress, to cancel loading and its method
LoadingProgressListener.loadingFinished(boolean, long, long, long) is called when loading is finished or as a result of error.
This method has two main purposes: one is to load a lot of ticks without keeping them all in memory, and second is asynchronous processing
instrument - instrument of the ticksfrom - start of the time interval for which ticks should be loadedto - end time of the time interval for which ticks should be loaded. If there is tick with time equals to the time in to
parameter then it will be loaded as welltickListener - receives data about requested ticksloadingProgress - used to control loading process
JFException - when some error occurs while creating internal request for data
void readTicks(Instrument instrument,
int numberOfOneSecondIntervalsBefore,
long time,
int numberOfOneSecondIntervalsAfter,
LoadingDataListener tickListener,
LoadingProgressListener loadingProgress)
throws JFException
tickListener. LoadingProgressListener is
used to receive feedback about loading progress, to cancel loading and its method
LoadingProgressListener.loadingFinished(boolean, long, long, long) is called when loading is finished or as a result of error
This method has two main purposes: one is to load a lot of ticks without keeping them all in memory, and second is asynchronous processing
instrument - instrument of the ticksnumberOfOneSecondIntervalsBefore - how much one second interval of ticks to load before and including one second interval of ticks with time specified in time parametertime - time of the last one second tick interval in period specified in numberOfOneSecondIntervalsBefore parameter or/and
time of the one second tick interval prior first one second tick interval in period specified with numberOfOneSecondIntervalsAfter parameternumberOfOneSecondIntervalsAfter - how much one second tick intervals to load after (not including) one second tick interval with time specified in time parameterbarListener - receives data about requested ticksloadingProgress - used to control loading progress
JFException - when some errors occurs
void readBars(Instrument instrument,
Period period,
OfferSide side,
long from,
long to,
LoadingDataListener barListener,
LoadingProgressListener loadingProgress)
throws JFException
barListener. LoadingProgressListener is
used to receive feedback about loading progress, to cancel loading and its method
LoadingProgressListener.loadingFinished(boolean, long, long, long) is called when loading is finished or as a result of error
This method has two main purposes: one is to load a lot of bars without keeping them all in memory, and second is asynchronous processing
instrument - instrument of the barsperiod - period of the barsside - side of the barsfrom - start of the time interval for which bars should be loaded. Should be the exact starting time of the bar for specified period.
See getBarStart(Period, long) description if you want to get bar starting time for bar that includes specific timeto - end time of the time interval for which bars should be loaded. This is the starting time of the last bar to be loadedbarListener - receives data about requested barsloadingProgress - used to control loading progress
JFException - when period is not supported or time interval is not valid for specified periodgetBarStart(Period, long)
void readBars(Instrument instrument,
Period period,
OfferSide side,
Filter filter,
long from,
long to,
LoadingDataListener barListener,
LoadingProgressListener loadingProgress)
throws JFException
barListener.
LoadingProgressListener is used to receive feedback about loading progress, to cancel loading and its method
LoadingProgressListener.loadingFinished(boolean, long, long, long) is called when loading is finished or as a result of error
This method has two main purposes: one is to load a lot of bars without keeping them all in memory, and second is asynchronous processing
instrument - instrument of the barsperiod - period of the barsside - side of the barsfilter - bars filtering method see Filterfrom - start of the time interval for which bars should be loaded. Should be the exact starting time of the bar for specified period.
See getBarStart(Period, long) description if you want to get bar starting time for bar that includes specific timeto - end time of the time interval for which bars should be loaded. This is the starting time of the last bar to be loadedbarListener - receives data about requested barsloadingProgress - used to control loading progress
JFException - when period is not supported or time interval is not valid for specified periodgetBarStart(Period, long)
void readBars(Instrument instrument,
Period period,
OfferSide side,
Filter filter,
int numberOfCandlesBefore,
long time,
int numberOfCandlesAfter,
LoadingDataListener barListener,
LoadingProgressListener loadingProgress)
throws JFException
barListener. LoadingProgressListener is
used to receive feedback about loading progress, to cancel loading and its method
LoadingProgressListener.loadingFinished(boolean, long, long, long) is called when loading is finished or as a result of error
This method has two main purposes: one is to load a lot of bars without keeping them all in memory, and second is asynchronous processing
instrument - instrument of the barsperiod - period of the barsside - side of the barsfilter - allows to filter candlesnumberOfCandlesBefore - how much candles to load before and including candle with time specified in time parametertime - time of the last candles in period specified in numberOfCandlesBefore parameter or/and
time of the candle prior first candle in period specified with numberOfCandlesAfter parameternumberOfCandlesAfter - how much candles to load after (not including) candle with time specified in time parameterbarListener - receives data about requested barsloadingProgress - used to control loading progress
JFException - when period is not supported or time interval is not valid for specified periodgetBarStart(Period, long)
java.util.List<ITick> getTicks(Instrument instrument,
long from,
long to)
throws JFException
OutOfMemoryException
instrument - instrument of the ticksfrom - start of the time interval for which ticks should be loadedto - end time of the time interval for which ticks should be loaded. If there is tick with time equals to the time in to
parameter then it will be loaded as well
JFException - when some error occurs when loading data
java.util.List<ITick> getTicks(Instrument instrument,
int numberOfOneSecondIntervalsBefore,
long time,
int numberOfOneSecondIntervalsAfter)
throws JFException
OutOfMemoryException
instrument - instrument of the ticksnumberOfOneSecondIntervalsBefore - how much one second interval of ticks to load before and including one second interval of ticks with time specified in time parametertime - time of the last one second tick interval in period specified in numberOfOneSecondIntervalsBefore parameter or/and
time of the one second tick interval prior first one second tick interval in period specified with numberOfOneSecondIntervalsAfter parameternumberOfOneSecondIntervalsAfter - how much one second tick intervals to load after (not including) one second tick interval with time specified in time parameter
JFException - when some error occurs when loading data
java.util.List<IBar> getBars(Instrument instrument,
Period period,
OfferSide side,
long from,
long to)
throws JFException
OutOfMemoryException
instrument - instrument of the barsperiod - period of the barsside - side of the barsfrom - start of the time interval for which bars should be loaded. Should be the exact starting time of the bar for specified period.
See getBarStart(Period, long) description if you want to get bar starting time for candle that includes specific timeto - end time of the time interval for which bars should be loaded. This is the starting time of the last candle to be loaded
JFException - when period is not supported or some error occurs when loading data
java.util.List<IBar> getBars(Instrument instrument,
Period period,
OfferSide side,
Filter filter,
long from,
long to)
throws JFException
OutOfMemoryException
instrument - instrument of the barsperiod - period of the barsside - side of the barsfilter - bars filtering method see Filterfrom - start of the time interval for which bars should be loaded. Should be the exact starting time of the bar for specified period.
See getBarStart(Period, long) description if you want to get bar starting time for candle that includes specific timeto - end time of the time interval for which bars should be loaded. This is the starting time of the last candle to be loaded
JFException - when period is not supported or some error occurs when loading data
java.util.List<IBar> getBars(Instrument instrument,
Period period,
OfferSide side,
Filter filter,
int numberOfCandlesBefore,
long time,
int numberOfCandlesAfter)
throws JFException
OutOfMemoryException. If the requested period includes the bar that is not fully
formed yet (in-progress bar), then it is included even if it's flat
instrument - instrument of the barsperiod - period of the barsside - side of the barsfilter - allows to filter candlesnumberOfCandlesBefore - how much candles to load before and including candle with time specified in time parametertime - time of the last candle in period specified in numberOfCandlesBefore parameter, or
time of the first candle in period specified with numberOfCandlesAfter parameter if numberOfCandlesBefore is 0, or
time of the candle prior to first candle in period specified with numberOfCandlesAfter if numberOfCandlesBefore is > 0numberOfCandlesAfter - how much candles to load after (not including) candle with time specified in time parameter
JFException - when period is not supported or some error occurs when loading data
long getBarStart(Period period,
long time)
throws JFException
time parameter
period - period of the bartime - time that is included by the bar
JFException - when period is not supported
long getNextBarStart(Period period,
long barTime)
throws JFException
barTime parameter
period - period of the barbarTime - time that is included by the bar previous to the returned
JFException - when period is not supported
long getPreviousBarStart(Period period,
long barTime)
throws JFException
barTime parameter
period - period to the barbarTime - time that is included by the bar next to the returned
JFException - when period is not supported
long getTimeForNBarsBack(Period period,
long to,
int numberOfBars)
throws JFException
numberOfBars - 1 back in time to the bar that includes time specified in
to parameter. Method can be used to get time for the from parameter for getBars(com.dukascopy.api.Instrument, com.dukascopy.api.Period, com.dukascopy.api.OfferSide, long, long)
method when is known time of the last bar and number of candles that needs to be loaded
period - period of the barsto - time of the last barnumberOfBars - number of bars that could be loaded when passing returned time and time specified in to parameter in
getBars(com.dukascopy.api.Instrument, com.dukascopy.api.Period, com.dukascopy.api.OfferSide, long, long) method
JFException - when period is not supported
long getTimeForNBarsForward(Period period,
long from,
int numberOfBars)
throws JFException
numberOfBars - 1 in the future to the bar that includes time specified in
from parameter. Method can be used to get time for the to parameter for getBars(com.dukascopy.api.Instrument, com.dukascopy.api.Period, com.dukascopy.api.OfferSide, long, long)
method when is known time of the first bar and number of candles that needs to be loaded
period - period of the barsfrom - time of the first barnumberOfBars - number of bars that could be loaded when passing returned time and time specified in from parameter in
getBars(com.dukascopy.api.Instrument, com.dukascopy.api.Period, com.dukascopy.api.OfferSide, long, long) method
JFException - when period is not supported
void readOrdersHistory(Instrument instrument,
long from,
long to,
LoadingOrdersListener ordersListener,
LoadingProgressListener loadingProgress)
throws JFException
ordersListener. LoadingProgressListener is
used to receive feedback about loading progress, to cancel loading and its method
LoadingProgressListener.loadingFinished(boolean, long, long, long) is called when loading is finished or as a result of error
This method can be used for orders loading without blocking strategy execution
NB! Only one order history request can be sent at a time. If there is another request sent method will throw JFException
instrument - instrument of the ordersfrom - start of the time interval for which orders should be loadedto - end time of the time interval for which orders should be loadedordersListener - receives data about requested ordersloadingProgress - used to control loading progress
JFException - in case of any system errorgetOrdersHistory(Instrument instrument, long from, long to)
java.util.List<IOrder> getOrdersHistory(Instrument instrument,
long from,
long to)
throws JFException
instrument - instrument of the ordersfrom - start of the time interval for which orders should be loadedto - end time of the time interval for which orders should be loaded
JFException - in case of any system error
IOrder getHistoricalOrderById(java.lang.String id)
throws JFException
id - closed order's position id
null if there is no one.
JFException - in case of any system errordouble getEquity()
java.util.List<IPointAndFigure> getPointAndFigures(Instrument instrument,
OfferSide offerSide,
PriceRange boxSize,
ReversalAmount reversalAmount,
long from,
long to)
throws JFException
OutOfMemoryException
If the requested period includes the bar that is not fully formed yet (in-progress bar), then it is included in result too
Subscribe to Point and Figure live notification first, before call this method.
instrument - of P&FsofferSide - offer side of P&FsboxSize - box size of P&FsreversalAmount - reversal amount of P&Fsfrom - start time of the time interval for which bars should be loaded. This time is included in interval [start; end] of the first loaded barto - end time of the time interval for which bars should be loaded. This time is included in interval [start; end] of the last loaded bar
JFException - when incorrect time interval is passed or some error occurs when loading data
java.util.List<IPointAndFigure> getPointAndFigures(Instrument instrument,
OfferSide offerSide,
PriceRange boxSize,
ReversalAmount reversalAmount,
int numberOfBarsBefore,
long time,
int numberOfBarsAfter)
throws JFException
OutOfMemoryException.
If the requested period includes the bar that is not fully formed yet (in-progress bar), then it is included in result too
Subscribe to Point and Figure live notification first, before call this method.
instrument - instrument of the P&FsofferSide - offer side of the P&FspriceRange - price range of the P&FsnumberOfBarsBefore - how much bars to load before and including bar with time specified in time parametertime - time of the last bar in period specified in numberOfBarsBefore parameter, or
time of the first bar in period specified with numberOfBarsAfter parameter if numberOfBarsBefore is 0, or
time of the candle prior to first candle in period specified with numberOfBarsAfter if numberOfBarsBefore is > 0numberOfBarsAfter - how much bars to load after (not including) bar with time specified in time parameter
JFException - when desired data amount is negative, etc; or some error occurs when loading data
void readPointAndFigures(Instrument instrument,
OfferSide offerSide,
PriceRange boxSize,
ReversalAmount reversalAmount,
long from,
long to,
IPointAndFigureFeedListener listener,
LoadingProgressListener loadingProgress)
throws JFException
listener. LoadingProgressListener is
used to receive feedback about loading progress, to cancel loading and its method
LoadingProgressListener.loadingFinished(boolean, long, long, long) is called when loading is finished or as a result of error
This method has two main purposes: one is to load a lot of bars without keeping them all in memory, and second is asynchronous processing
Subscribe to Point and Figure live notification first, before call this method.
instrument - of P&FsofferSide - offer side of P&FsboxSize - box size of P&FsreversalAmount - reversal amount of P&Fsfrom - start time of the time interval for which bars should be loaded. This time is included in interval [start; end] of the first loaded barto - end time of the time interval for which bars should be loaded. This time is included in interval [start; end] of the last loaded barlistener - receives data about requested barsloadingProgress - used to control loading progress
JFException - when incorrect time interval is passed or some error occurs when loading data
void readPointAndFigures(Instrument instrument,
OfferSide offerSide,
PriceRange boxSize,
ReversalAmount reversalAmount,
int numberOfBarsBefore,
long time,
int numberOfBarsAfter,
IPointAndFigureFeedListener listener,
LoadingProgressListener loadingProgress)
throws JFException
listener. LoadingProgressListener is
used to receive feedback about loading progress, to cancel loading and its method
LoadingProgressListener.loadingFinished(boolean, long, long, long) is called when loading is finished or as a result of error
This method has two main purposes: one is to load a lot of bars without keeping them all in memory, and second is asynchronous processing
Subscribe to Point and Figure live notification first, before call this method.
instrument - of P&FsofferSide - offer side of P&FsboxSize - box size of P&FsreversalAmount - reversal amount of P&FsnumberOfBarsBefore - how much bars to load before and including bar with time specified in time parametertime - time of the last bar in period specified in numberOfBarsBefore parameter, or
time of the first bar in period specified with numberOfBarsAfter parameter if numberOfBarsBefore is 0, or
time of the candle prior to first candle in period specified with numberOfBarsAfter if numberOfBarsBefore is > 0numberOfBarsAfter - how much bars to load after (not including) bar with time specified in time parameterlistener - receives data about requested barsloadingProgress - used to control loading progress
JFException - when incorrect time interval is passed or some error occurs when loading data
IPointAndFigure getPointAndFigure(Instrument instrument,
OfferSide offerSide,
PriceRange boxSize,
ReversalAmount reversalAmount,
int shift)
throws JFException
shift
parameter, 0 - current bar, 1 - previous bar (last formed bar) If there is no bar loaded at that
position, then function returns null.
instrument - instrument of P&FofferSide - bid or ask side of P&FboxSize - box size of the P&FreversalAmount - reversal amount of the P&Fshift - number of P&F back in time staring from current P&F. 1 - previous P&F, 2 - current P&F minus 2 bars and so on
JFException - when shift value is negative or instrument is not active (not opened in platform)
java.util.List<ITickBar> getTickBars(Instrument instrument,
OfferSide offerSide,
TickBarSize tickBarSize,
long from,
long to)
throws JFException
OutOfMemoryException
If the requested period includes the bar that is not fully formed yet (in-progress bar), then it is included in result too
Subscribe to Tick Bar live notification first, before call this method.
instrument - of Tick BarsofferSide - offer side of Tick BarstickBarSize - tick bar size of Tick Barsfrom - start time of the time interval for which bars should be loaded. This time is included in interval [start; end] of the first loaded barto - end time of the time interval for which bars should be loaded. This time is included in interval [start; end] of the last loaded bar
JFException - when incorrect time interval is passed or some error occurs when loading data
java.util.List<ITickBar> getTickBars(Instrument instrument,
OfferSide offerSide,
TickBarSize tickBarSize,
int numberOfBarsBefore,
long time,
int numberOfBarsAfter)
throws JFException
OutOfMemoryException.
If the requested period includes the bar that is not fully formed yet (in-progress bar), then it is included in result too
Subscribe to Tick Bar live notification first, before call this method.
instrument - instrument of the tick barsofferSide - offer side of the tick barstickBarSize - tick bar size of the tick barsnumberOfBarsBefore - how much bars to load before and including bar with time specified in time parametertime - time of the last bar in period specified in numberOfBarsBefore parameter, or
time of the first bar in period specified with numberOfBarsAfter parameter if numberOfBarsBefore is 0, or
time of the candle prior to first candle in period specified with numberOfBarsAfter if numberOfBarsBefore is > 0numberOfBarsAfter - how much bars to load after (not including) bar with time specified in time parameter
JFException - when desired data amount is negative, etc; or some error occurs when loading data
void readTickBars(Instrument instrument,
OfferSide offerSide,
TickBarSize tickBarSize,
long from,
long to,
ITickBarFeedListener listener,
LoadingProgressListener loadingProgress)
throws JFException
listener. LoadingProgressListener is
used to receive feedback about loading progress, to cancel loading and its method
LoadingProgressListener.loadingFinished(boolean, long, long, long) is called when loading is finished or as a result of error
This method has two main purposes: one is to load a lot of bars without keeping them all in memory, and second is asynchronous processing
Subscribe to Tick Bar live notification first, before call this method.
instrument - of Tick BarsofferSide - offer side of Tick BarstickBarSize - tick bar size of Tick Barsfrom - start time of the time interval for which bars should be loaded. This time is included in interval [start; end] of the first loaded barto - end time of the time interval for which bars should be loaded. This time is included in interval [start; end] of the last loaded barlistener - receives data about requested barsloadingProgress - used to control loading progress
JFException - when incorrect time interval is passed or some error occurs when loading data
void readTickBars(Instrument instrument,
OfferSide offerSide,
TickBarSize tickBarSize,
int numberOfBarsBefore,
long time,
int numberOfBarsAfter,
ITickBarFeedListener listener,
LoadingProgressListener loadingProgress)
throws JFException
listener. LoadingProgressListener is
used to receive feedback about loading progress, to cancel loading and its method
LoadingProgressListener.loadingFinished(boolean, long, long, long) is called when loading is finished or as a result of error
This method has two main purposes: one is to load a lot of bars without keeping them all in memory, and second is asynchronous processing
Subscribe to Tick Bar live notification first, before call this method.
instrument - of Tick BarsofferSide - offer side of Tick BarstickBarSize - tick bar size of Tick BarsnumberOfBarsBefore - how much bars to load before and including bar with time specified in time parametertime - time of the last bar in period specified in numberOfBarsBefore parameter, or
time of the first bar in period specified with numberOfBarsAfter parameter if numberOfBarsBefore is 0, or
time of the candle prior to first candle in period specified with numberOfBarsAfter if numberOfBarsBefore is > 0numberOfBarsAfter - how much bars to load after (not including) bar with time specified in time parameterlistener - receives data about requested barsloadingProgress - used to control loading progress
JFException - when incorrect time interval is passed or some error occurs when loading data
ITickBar getTickBar(Instrument instrument,
OfferSide offerSide,
TickBarSize tickBarSize,
int shift)
throws JFException
shift
parameter, 0 - current bar, 1 - previous bar (last formed bar) If there is no bar loaded at that
position, then function returns null.
instrument - instrument of the tick barofferSide - bid or ask side of the tick bartickBarSize - tick bar size of the tick barshift - number of tick bar back in time staring from current tick bar. 1 - previous tick bar, 2 - current tick bar minus 2 bars and so on
JFException - when shift value is negative or instrument is not active (not opened in platform)
java.util.List<IRangeBar> getRangeBars(Instrument instrument,
OfferSide offerSide,
PriceRange priceRange,
long from,
long to)
throws JFException
OutOfMemoryException
If the requested period includes the bar that is not fully formed yet (in-progress bar), then it is included in result too
Subscribe to Range Bar live notification first, before call this method.
instrument - of Range BarsofferSide - offer side of Range BarspriceRange - price range of Range Barsfrom - start time of the time interval for which bars should be loaded. This time is included in interval [start; end] of the first loaded barto - end time of the time interval for which bars should be loaded. This time is included in interval [start; end] of the last loaded bar
JFException - when incorrect time interval is passed or some error occurs when loading data
java.util.List<IRangeBar> getRangeBars(Instrument instrument,
OfferSide offerSide,
PriceRange priceRange,
int numberOfBarsBefore,
long time,
int numberOfBarsAfter)
throws JFException
OutOfMemoryException.
If the requested period includes the bar that is not fully formed yet (in-progress bar), then it is included in result too
Subscribe to Range Bar live notification first, before call this method.
instrument - instrument of the Range barsofferSide - offer side of the Range barspriceRange - price range of the Range barsnumberOfBarsBefore - how much bars to load before and including bar with time specified in time parametertime - time of the last bar in period specified in numberOfBarsBefore parameter, or
time of the first bar in period specified with numberOfBarsAfter parameter if numberOfBarsBefore is 0, or
time of the candle prior to first candle in period specified with numberOfBarsAfter if numberOfBarsBefore is > 0numberOfBarsAfter - how much bars to load after (not including) bar with time specified in time parameter
JFException - when desired data amount is negative, etc; or some error occurs when loading data
void readRangeBars(Instrument instrument,
OfferSide offerSide,
PriceRange priceRange,
long from,
long to,
IRangeBarFeedListener listener,
LoadingProgressListener loadingProgress)
throws JFException
listener. LoadingProgressListener is
used to receive feedback about loading progress, to cancel loading and its method
LoadingProgressListener.loadingFinished(boolean, long, long, long) is called when loading is finished or as a result of error
This method has two main purposes: one is to load a lot of bars without keeping them all in memory, and second is asynchronous processing
Subscribe to Range Bar live notification first, before call this method.
instrument - of Range BarsofferSide - offer side of Range BarspriceRange - price range of Range Barsfrom - start time of the time interval for which bars should be loaded. This time is included in interval [start; end] of the first loaded barto - end time of the time interval for which bars should be loaded. This time is included in interval [start; end] of the last loaded barlistener - receives data about requested barsloadingProgress - used to control loading progress
JFException - when incorrect time interval is passed or some error occurs when loading data
void readRangeBars(Instrument instrument,
OfferSide offerSide,
PriceRange priceRange,
int numberOfBarsBefore,
long time,
int numberOfBarsAfter,
IRangeBarFeedListener listener,
LoadingProgressListener loadingProgress)
throws JFException
listener. LoadingProgressListener is
used to receive feedback about loading progress, to cancel loading and its method
LoadingProgressListener.loadingFinished(boolean, long, long, long) is called when loading is finished or as a result of error
This method has two main purposes: one is to load a lot of bars without keeping them all in memory, and second is asynchronous processing
Subscribe to Range Bar live notification first, before call this method.
instrument - of Range BarsofferSide - offer side of Range BarspriceRange - price range of Range BarsnumberOfBarsBefore - how much bars to load before and including bar with time specified in time parametertime - time of the last bar in period specified in numberOfBarsBefore parameter, or
time of the first bar in period specified with numberOfBarsAfter parameter if numberOfBarsBefore is 0, or
time of the candle prior to first candle in period specified with numberOfBarsAfter if numberOfBarsBefore is > 0numberOfBarsAfter - how much bars to load after (not including) bar with time specified in time parameterlistener - receives data about requested barsloadingProgress - used to control loading progress
JFException - when incorrect time interval is passed or some error occurs when loading data
IRangeBar getRangeBar(Instrument instrument,
OfferSide offerSide,
PriceRange priceRange,
int shift)
throws JFException
shift
parameter, 0 - current bar, 1 - previous bar (last formed bar) If there is no bar loaded at that
position, then function returns null.
instrument - instrument of the range barofferSide - bid or ask side of the range barpriceRange - price range of the range barshift - number of range bar back in time staring from current range bar. 1 - previous range bar, 2 - current range bar minus 2 bars and so on
JFException - when shift value is negative or instrument is not active (not opened in platform)
ITick getTick(Instrument instrument,
int shift)
throws JFException
shift
parameter, 0 - current tick, 1 - previous tick.
instrument - instrument of the tickshift - number of tick back in time staring from current tick. 1 - previous tick, 2 - current tick minus 2 ticks and so on
JFException - when instrument is not active (not opened in platform) or other errors
IRenkoBar getRenkoBar(Instrument instrument,
OfferSide offerSide,
PriceRange brickSize,
int shift)
throws JFException
shift
parameter, 0 - current bar, 1 - previous bar (last formed bar) If there is no bar loaded at that
position, then function returns null.
instrument - instrument of the Renko barofferSide - bid or ask side of the Renko barbrickSize - price range of the Renko barshift - number of bar back in time staring from current bar. 1 - previous bar, 2 - current bar minus 2 bars and so on
JFException - when shift value is negative or instrument is not active (not opened in platform)
java.util.List<IRenkoBar> getRenkoBars(Instrument instrument,
OfferSide offerSide,
PriceRange brickSize,
long from,
long to)
throws JFException
OutOfMemoryException
If the requested period includes the bar that is not fully formed yet (in-progress bar), then it is included in result too
Subscribe to Renko Bar live notification first, before call this method.
instrument - of Renko BarsofferSide - offer side of Renko BarsbrickSize - price range of Renko Barsfrom - start time of the time interval for which bars should be loaded. This time is included in interval [start; end] of the first loaded barto - end time of the time interval for which bars should be loaded. This time is included in interval [start; end] of the last loaded bar
JFException - when incorrect time interval is passed or some error occurs when loading data
java.util.List<IRenkoBar> getRenkoBars(Instrument instrument,
OfferSide offerSide,
PriceRange brickSize,
int numberOfBarsBefore,
long time,
int numberOfBarsAfter)
throws JFException
OutOfMemoryException.
If the requested period includes the bar that is not fully formed yet (in-progress bar), then it is included in result too
Subscribe to Renko Bar live notification first, before call this method.
instrument - instrument of the Renko barsofferSide - offer side of the Renko barsbrickSize - price range of the Renko barsnumberOfBarsBefore - how much bars to load before and including bar with time specified in time parametertime - time of the last bar in period specified in numberOfBarsBefore parameter, or
time of the first bar in period specified with numberOfBarsAfter parameter if numberOfBarsBefore is 0, or
time of the candle prior to first candle in period specified with numberOfBarsAfter if numberOfBarsBefore is > 0numberOfBarsAfter - how much bars to load after (not including) bar with time specified in time parameter
JFException - when desired data amount is negative, etc; or some error occurs when loading data
void readRenkoBars(Instrument instrument,
OfferSide offerSide,
PriceRange brickSize,
long from,
long to,
IRenkoBarFeedListener listener,
LoadingProgressListener loadingProgress)
throws JFException
listener. LoadingProgressListener is
used to receive feedback about loading progress, to cancel loading and its method
LoadingProgressListener.loadingFinished(boolean, long, long, long) is called when loading is finished or as a result of error
This method has two main purposes: one is to load a lot of bars without keeping them all in memory, and second is asynchronous processing
Subscribe to Renko Bar live notification first, before call this method.
instrument - of Renko BarsofferSide - offer side of Renko BarsbrickSize - price range of Renko Barsfrom - start time of the time interval for which bars should be loaded. This time is included in interval [start; end] of the first loaded barto - end time of the time interval for which bars should be loaded. This time is included in interval [start; end] of the last loaded barlistener - receives data about requested barsloadingProgress - used to control loading progress
JFException - when incorrect time interval is passed or some error occurs when loading data
void readRenkoBars(Instrument instrument,
OfferSide offerSide,
PriceRange brickSize,
int numberOfBarsBefore,
long time,
int numberOfBarsAfter,
IRenkoBarFeedListener listener,
LoadingProgressListener loadingProgress)
throws JFException
listener. LoadingProgressListener is
used to receive feedback about loading progress, to cancel loading and its method
LoadingProgressListener.loadingFinished(boolean, long, long, long) is called when loading is finished or as a result of error
This method has two main purposes: one is to load a lot of bars without keeping them all in memory, and second is asynchronous processing
Subscribe to Renko Bar live notification first, before call this method.
instrument - of Renko BarsofferSide - offer side of Renko BarsbrickSize - price range of Renko BarsnumberOfBarsBefore - how much bars to load before and including bar with time specified in time parametertime - time of the last bar in period specified in numberOfBarsBefore parameter, or
time of the first bar in period specified with numberOfBarsAfter parameter if numberOfBarsBefore is 0, or
time of the candle prior to first candle in period specified with numberOfBarsAfter if numberOfBarsBefore is > 0numberOfBarsAfter - how much bars to load after (not including) bar with time specified in time parameterlistener - receives data about requested barsloadingProgress - used to control loading progress
JFException - when incorrect time interval is passed or some error occurs when loading data
ITimedData getFeedData(IFeedDescriptor feedDescriptor,
int shift)
throws JFException
shift
parameter, 0 - current bar (currently generated), 1 - previous bar (last formed bar) If there is no bar loaded at that
position, then function returns null.
feedDescriptor - holds parameters: data type, instrument, offer side, etc (depends on bar type), and describes what kind of bars must be loadedshift - number of bars back in time staring from current bar. 1 - previous bar, 2 - current bar minus 2 bars and so on
FeedDescriptor.getDataType()
JFException - when some error occurs when loading data
java.util.List<ITimedData> getFeedData(IFeedDescriptor feedDescriptor,
long from,
long to)
throws JFException
OutOfMemoryException
feedDescriptor - holds parameters: data type, instrument, offer side, etc (depends on bar type), and describes what kind of bars must be loadedfrom - start of the time interval for which bars should be loadedto - end time of the time interval for which bars should be loaded. If there is bar with time equals to the time in to
parameter then it will be loaded as well
JFException - when incorrect time interval is passed or some error occurs when loading data
java.util.List<ITimedData> getFeedData(IFeedDescriptor feedDescriptor,
int numberOfFeedBarsBefore,
long time,
int numberOfFeedBarsAfter)
throws JFException
OutOfMemoryException.
feedDescriptor - holds parameters: data type, instrument, offer side, etc (depends on bar type), and describes what kind of bars must be loadednumberOfFeedBarsBefore - how much bars to load before and including bar with time specified in time parametertime - the time of the last bar in period specified in numberOfFeedBarsBefore parameter, or
the time of the first bar in period specified with numberOfFeedBarsAfter parameter if numberOfFeedBarsBefore is 0, or
the time of the bar prior to the first bar in period specified with numberOfFeedBarsAfter if numberOfFeedBarsBefore is > 0numberOfFeedBarsAfter - how much bars to load after (not including) bar with time specified in time parameter
JFException - when some error occurs when loading data
void readFeedData(IFeedDescriptor feedDescriptor,
long from,
long to,
IFeedListener feedListener,
LoadingProgressListener loadingProgress)
throws JFException
feedListener. LoadingProgressListener is
used to receive feedback about loading progress, to cancel loading and its method
LoadingProgressListener.loadingFinished(boolean, long, long, long) is called when loading is finished or as a result of error
This method has two main purposes: one is to load a lot of bars without keeping them all in memory, and second is asynchronous processing
feedDescriptor - feed descriptor of the feed datafrom - start of the time interval for which feed data items should be loaded.to - end time of the time interval for which feed data items should be loaded.feedListener - receives data about requested feed data itemsloadingProgress - used to control loading progress
JFException - when some errors occurs
void readFeedData(IFeedDescriptor feedDescriptor,
int numberOfFeedDataBefore,
long time,
int numberOfFeedDataAfter,
IFeedListener feedListener,
LoadingProgressListener loadingProgress)
throws JFException
feedListener. LoadingProgressListener is
used to receive feedback about loading progress, to cancel loading and its method
LoadingProgressListener.loadingFinished(boolean, long, long, long) is called when loading is finished or as a result of error
This method has two main purposes: one is to load a lot of feed data without keeping them all in memory, and second is asynchronous processing
feedDescriptor - feed descriptor of the feed datanumberOfOneSecondIntervalsBefore - how much feed data items to load before and including feed data item with time specified in time parametertime - time of the last feed data item in period specified in numberOfFeedDataBefore parameter or/and
time of the feed data item prior first feed data item in period specified with numberOfFeedDataAfter parameternumberOfFeedDataAfter - how much feed data items to load after (not including) feed data item with time specified in time parameterfeedListener - receives feed dataloadingProgress - used to control loading progress
JFException - when some errors occurs