Trabalho concluído
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Termos de Referência
I've a prototype of class which aims to store the values of the indicators. I believe it's nearly finished, but it needs some expert eye to finish it up, improve and test it.
Here are the job goals:
- store the values depending on the type (doubles, integers or bools, you can use MqlParam struct, overloaded methods or function templates),
- for each value, store the bar datetime and key of the value (e.g. MODE_MAIN, MODE_SIGNAL),
- when new key is specified along with the value, add this key as new automatically,
- each value is added on the top of the array (Array as Series), so accessing 0th element should always return the latest,
- when value has been added for the same bar time again for given timeframe, ignore it (unless force option is specified, so it'll update the existing one),
- here is the proposed sample usage of that class given dummy values of MA and MACD indicators, so after finish demonstrate that the class is working on the existing simple code,
- print the values when calling ToString(),
- adjust and provide code demonstrating sample usage of that class for the testing purposes (as per link above, you can use the existing one).
Coding rules:
- provide warning/error free code,
- use the existing class, don't create a new one,
- don't use external libraries or classes other than existing,
- avoid adding not related things,
- use indentation of 2 spaces, no trailing spaces,
- clean up any unused objects to avoid any memory leak reports,
- existing code is compatible with MQL5 and MQL4, so it should stay this way.
Please don't apply if you don't have time this week, or if you're not familiar with MQL5 class coding.
Class file: Indicator.mqh (however you need to download the whole zip file to include the other classes).