If you want get InProgress Candles for custom period, you need to specify feeddescriptor and subscribe to feed.
public class MyStrategy implements IStrategy, IFeedListener {
IConsole console;
IHistory history;
@Configurable("Instrument")
public Instrument instrument = Instrument.EURUSD;
@Configurable("OfferSide")
public OfferSide offerSide = OfferSide.ASK;
@Override
public void onStart(IContext context) throws JFException {
console = context.getConsole();
history = context.getHistory();
Period myPeriod = Period.createCustomPeriod(Unit.Week, 1, JFTimeZone.EET);
IFeedDescriptor feedDescriptor = new TimePeriodAggregationFeedDescriptor(instrument, myPeriod, offerSide, Filter.WEEKENDS);
context.subscribeToFeed(feedDescriptor, this);
IBar myBar = history.getBar(instrument, myPeriod, offerSide, 0);
console.getOut().println(myBar);
}