Added a function to group candles, from function doc
// GroupCandles groups a set of candles in another set of candles, basing on a grouping factor.
//
// This is pretty useful if you want to transform, for example, 15min candles into 1h candles using same data.
//
// This avoid calling multiple times the exchange for multiple contexts.
//
// Example:
// To transform 15 minute candles in 30 minutes candles you have a grouping factor = 2
//
// To transform 15 minute candles in 1 hour candles you have a grouping factor = 4
//
// To transform 30 minute candles in 1 hour candles you have a grouping factor = 2
added also tests and reformatted code to fix some bugs and align with the rest of the library standards (old candles as first elements, it was against it before, with new candles as first elements)
Added a function to group candles, from function doc
added also tests and reformatted code to fix some bugs and align with the rest of the library standards (old candles as first elements, it was against it before, with new candles as first elements)