As far as I know, you get the last not finished bar automatically:
"
The getBar method returns an IBar by shift. Shift of value 0 refers to the current candle that's not is not yet fully formed, 1 - latest fully formed candle, 2 - second to last candle. Consider retrieving previous 1 hour bar for EUR/USD:
"
https://www.dukascopy.com/wiki/en/development/strategy-api/historical-data/history-barsUse onTick, if you want to use the tick, which isn't a period, but a point in time.
Use onBar for default periods.
Use onFeed for custom periods, you have to subscribe for them.
https://www.dukascopy.com/wiki/en/development/strategy-api/historical-data/feed-history