package jforex;

import java.util.*;

import com.dukascopy.api.*;

public class TickVolumeTest implements IStrategy {
    private IConsole console;
 
    public void onTick(Instrument instrument, ITick tick) throws JFException {
        if (instrument != Instrument.EURUSD) return;
        try{
            double askVolume = tick.getTotalAskVolume();
            console.getOut().println(instrument+": current ask volume = "+askVolume);
        }
        catch (Exception e){
            e.printStackTrace(console.getErr());
        }
    } 
          
                
    public void onStart(IContext context) throws JFException {
        console = context.getConsole();
    }
    public void onAccount(IAccount account) throws JFException {}
    public void onMessage(IMessage message) throws JFException {}
    public void onStop() throws JFException {}
    public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException { }
}