Static members of a class must be inizialited in the global scope. In your case, you can add this code outside your class:
CArrayDouble ResBPB_Setup::ResBPB_levels = { 0 }; CArrayDouble ResBOF_Setup::ResBOF_levels = { 0 };
Regards.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I am trying to create a class to hold variables related to various ongoing potential trade setups. A new Trade_Setup object is created each time a support/resistance level is approached/breached. To avoid adding multiple setups at the same level, I want to save the levels that have ongoing analysis in a static CArrayDouble. However, when I do this, I am shown the compile error of "unresolved static variable". I had read elsewhere on the forum that I apparently have to initialise any static data members of a class. This is not possible however in a dynamic array of unknown size. How can I fix this?