Using the available aggregation types in your code
As we know, chart aggregation is a type of displaying aggregated values. These values are price, volume and time. The main idea of each aggregation is to help traders analyze the state of the market in history and in real time.
At this moment, Quantower API supports 9aggregation types. All of them you can use in your scripts easily. But before we continue, please read the article how to download history by using Quantower API.
To download aggregated history we need use GetHistory method which takes instanse of HistoryRequestParameters class as input parameter. This class contains the necessary properties such as FromTime, ToTime, HistoryType, etc. with which we can flexibly customize our request. But today we are interested in the Aggregation property. This property contains instance of HistoryAggregation class which is base class for all available aggregation types. All we need to get the aggregated history is to set to this property instance of required aggregation type.
Listed below are all available aggregation classes with examples of history requests.