You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Finish Indicator class which aims to store the values of the indicators.
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.
Finish Indicator class which aims to store the values of the indicators.
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.
Class file:
Indicator.mqh
Related: GH-23, GH-50
--
Est. 6-10h
The text was updated successfully, but these errors were encountered: