CSALChartPoints is a class for expanding the capabilities of MqlRates.
Advantages of the class:
- It provides a simpler interface for working with MqlRates.
- It extends the parameter set of the candlesticks (for example, it add the body_high parameter, which shows the closing price for the bullish candles and the opening price for the bearish candles — the upper limit of the candle’s “body”).
- Introduces an abstract term Value, which indicates one of the specified parameters of the candlesticks.
Example â„–1 (the average values of 400 bar for the High parameter of the candlesticks):
CSALChartPoints points; points.PointType(HIGH); double m_avg = points.Avg(400);
Example â„–2 (the average values of 400 bar for the Low parameter of the candlesticks):
CSALChartPoints points; points.PointType(LOW); double m_avg = points.Avg(400);
Example â„–3 (processing set of 100 bars):
double sum; CSALChartPoints points; for(int i = 100; i > 0; i--) Â Â sum = points.At(i).high;