- 2009.11.23
- Андрей
- www.mql5.com
- multi custom max
- MetaTrader 4 Android with Technical Indicators Has Been Released
- Charting of MetaTrader 5 iPhone [VIDEO] & MetaTrader 5 Android Screenshots
My EA updates Global Variables with the threshold levels of the Stochastic Indicator it uses for trading. Then my custom Stochastic Indicator reads these same Global Variables so it displays using the same parameters as the EA.
Hope this helps...ChuckM
- www.mql5.com
My EA updates Global Variables with the threshold levels of the Stochastic Indicator it uses for trading. Then my custom Stochastic Indicator reads these same Global Variables so it displays using the same parameters as the EA.
Hope this helps...ChuckM
Yes, it should work by the way you metioned.
but best solution is that we can access the indicators just like accessing class objects which have a number of virtual methods.
Handle of this indicator should be treated as pointer of the object.
Is it possiable?
You create a static variable in your indicator's class file. This way the EA's parameters can be set and manipulated with a custom set of parameters, and the indicator reads the same static (unchanging) "handle" at that location. You can use the data parameters/settings and retrieved by accessing the returned pointer and reinitialize your indicator.
Hopefully this can solve your scenario.
Local variables can be declared with the access specifier static. In this case, the compiler has a variable in the global pool of memory. Therefore, the lifetime of a static variable is equal to the lifetime of the program. Here the scope of such a variable is limited to the block in which it is declared.
- www.mql5.com
You create a static variable in your indicator's class file. This way the EA's parameters can be set and manipulated with a custom set of parameters, and the indicator reads the same static (unchanging) "handle" at that location. You can use the data parameters/settings and retrieved by accessing the returned pointer and reinitialize your indicator.
Hopefully this can solve your scenario.
Lugner,
Can you give an example for this? it will be easy to understand... thanks a lot.
Lugner,
Can you give an example for this? it will be easy to understand... thanks a lot.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use