It looks like you're new here. If you want to get involved, click one of these buttons!
tickerProvider.setOnTickerArrivalListener(new OnTicks() {
@Override
public void onTicks(ArrayList<Tick> ticks) {
NumberFormat formatter = new DecimalFormat();
System.out.println("ticks size "+ticks.size());
if(ticks.size() > 0) {
System.out.println("last price "+ticks.get(0).getLastTradedPrice());
System.out.println("open interest "+formatter.format(ticks.get(0).getOi()));
System.out.println("day high OI "+formatter.format(ticks.get(0).getOpenInterestDayHigh()));
System.out.println("day low OI "+formatter.format(ticks.get(0).getOpenInterestDayLow()));
System.out.println("change "+formatter.format(ticks.get(0).getChange()));
System.out.println("tick timestamp "+ticks.get(0).getTickTimestamp());
System.out.println("tick timestamp date "+ticks.get(0).getTickTimestamp());
System.out.println("last traded time "+ticks.get(0).getLastTradedTime());
System.out.println(ticks.get(0).getMarketDepth().get("buy").size());
}
}
});
You can try storing previous ltp in local variable and then use condition to alert, if current feed last traded price is not equal to previous stored ltp, in the same loop you can keep swapping ltp local variable with the latest one.
You may try setting mode to modeLTP.
We can help you out with your above query, It is very much possible in our platform with more customizable options
Kindly contact: [email protected]
Call : +91 8291474939/ +91 8879647666
Website : www.algobulls.com
Dear sir
We can help you out with the Automatic Algorithm software with more customizable options also access set your own strategy and of our clients who are ready to share there strategy
Kindly contact: [email protected]
Call : +91 8291474939/ +91 8879647666
Website : www.algobulls.com