Package velox.api.layer1.simplified
Interface IntervalListener
- All Known Subinterfaces:
AllDataModule,BarDataAdapter,BarDataListener,IntervalAdapter
public interface IntervalListener
-
Method Summary
Modifier and Type Method Description longgetInterval()Return desired interval width in nanoseconds.voidonInterval()Called with frequency set bygetInterval().
-
Method Details
-
getInterval
long getInterval()Return desired interval width in nanoseconds. Should always be larger thanIntervals.MIN_INTERVAL. You can use other constants inIntervalsclass for common intervals, but you are not required to. -
onInterval
void onInterval()Called with frequency set bygetInterval(). Useful as replacement forBarDataListener.onBar(velox.api.layer1.layers.utils.OrderBook, Bar)when you don't really need the bar itself and just want a timer functionality (keep in mind, that indicator time is not bound to computer clock, so using general-purpose timers won't work in many cases)
-