gooly:
iCustom(NULL, 0, "thisIndi",Extern1,Extern2,Extern3, EMPTY_VALUE, 0,0);
this indicator calls itself by using iCustom(..) in init(). My question when does the indicator 'disappear' from the memory?
- I'm not sure you can call iCustom in init - init can not wait
- Why are you calling yourself with the same values you already have and then ignoring the returned value?
- If your parameters exactly match your call - there is only one indicator. If they don't match there are two (one hidden).
- I'm not sure you can call iCustom in init - init can not wait
- Why are you calling yourself with the same values you already have and then ignoring the returned value?
- If your parameters exactly match your call - there is only one indicator. If they don't match there are two (one hidden).
add 1) it works! It continues after iCustom has finished and has set the GlobalValue :)
add 2) not the same value: org call with drawBars=100, iCustom(..) sets this value to Empty_Value to detect this call - not quite clear by me, sorry. Beside that it has to be the same (other) extern values otherwise the long average won't make sense!
add 3) first call.. 2nd call (calc Bars bars: 67'000 bars in m1, 65'000 in m5 only once) .. now it works only with 100 bars
the service desk just told me the indicator of iCustom(..) in init() stays alive and cannot be killed :(.
mt4 is not ready to program recursively :(
gooly
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
the basic question is how long does an indicator live with all its arrays and buffers and is it updated by each tick when called only once?
My objective:
I want to get a long-term average and want to 'offer' this value other EA by using GlobalVariables.
The normal call of this indicator is only 'some' bars back, due to a number of arrays that I have to administarte myself (can't have more than 8 Indicator-buffers) and I don't want them too big.
So if the GlobalVariable does not exist this indicator calls itself by using iCustom(..) in init(). My question when does the indicator 'disappear' from the memory?
This is the code: