public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {
        
        if (!instrument.equals(myInstrument) || !period.equals(myPeriod))
        {
            return;

        }
        
        IBar bar=history.getBar(instrument, period, OfferSide.BID, 0);
        console.getOut().println("Open Bar Time now "+Sdf.format(bar.getTime()));
        
        IBar bar1=history.getBar(instrument, period, OfferSide.BID, 1);
        console.getOut().println("Open Bar Time Previous "+Sdf.format(bar1.getTime()));
        
        console.getOut().println("Bar now open: "+bar.getOpen());
        console.getOut().println("Bar previous Close: "+bar1.getClose());
        
        
    }