Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finish up the Indicator class file to store the indicator values #24

Closed
kenorb opened this issue May 16, 2017 · 1 comment
Closed

Finish up the Indicator class file to store the indicator values #24

kenorb opened this issue May 16, 2017 · 1 comment

Comments

@kenorb
Copy link
Member

kenorb commented May 16, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants