Carl Schreiber:
|
|
Add 2.: CallingCaVol is 'lonesome' running on one chart - nothing else! That's why I don't understand that!
I have another call of OnInit() in OnCalculate() if the timeframe was changed but I placed the line before as well a Print(__LINE__,..) but this never appears!
int OnCalculate(..) { ... if (ActTF != _Period) { Print(__LINE__," ",WindowExpertName()," ",ActTF," != ",_Period); OnInit(); ReInit = true; return(0); }
... ?
Edit: Even after CallingCaVol provides all the parameter calling CaVol it enters the endless loop... :(
Metaquotes said that they are not about to continue developping mt4, but they change things and it is not to the best of the mt4: on y soit qui mal y pense!
Hi
I (Win7, 64, mt4, b1090) have an indicator CaVol with about 10 Parameter of which only the first two matters (the rest is for the presentation).
This
indicator has 34 puffer. Now I wrote a second indicator CallingCaVol()
that calls the first one - but only with the first two parameters - assuming that the others will taken by their default values
( simplified this call):
As now in OnInit() of CaVol I placed:
I see in the expert log hundreds and hundreds of until the pc runs out of memory:
- I expect that the default values are taken by CaVol by such a call - right or wrong? As far as I remember it was that way!
- I expect WindowExpertName() to returm the indicator name CallingCaVol that calls CaVol but not CaVol - who is that wrong - me or mt4?
- I
expect that due to the call of CaVol with the same parameters CaVol is
created only ONCE and not each time it is called - why is that
different?
You are right.
Add 2.: CallingCaVol is 'lonesome' running on one chart - nothing else! That's why I don't understand that!
I have another call of OnInit() in OnCalculate() if the timeframe was changed but I placed the line before as well a Print(__LINE__,..) but this never appears!
... ?
Edit: Even after CallingCaVol provides all the parameter calling CaVol it enters the endless loop... :(
Metaquotes said that they are not about to continue developping mt4, but they change things and it is not to the best of the mt4: on y soit qui mal y pense!
"Honni soit qui mal y pense" ;-)
Could you provide code that compiles to reproduce your issue ?
|
Alain Verleyen: I don't understand what you mean ? Why call recursively ? It's just a print.
| What I think he has, in the indicator CallingCaVol a IndicatorShortName("CaVol") so when it calls iCustom("CaVol") it is calling another copy of itself. But he refuses to show the code. |
I am about to code a sample code..
Ok I will test it, as I probably misunderstood.
You have to wait a bit, I have to do my weekend shopping now, as I was struggling with this 'feature' the whole morning ...
- 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
I (Win7, 64, mt4, b1090) have an indicator CaVol with about 10 Parameter of which only the first two matters (the rest is for the presentation).
This indicator has 34 puffer. Now I wrote a second indicator CallingCaVol() that calls the first one - but only with the first two parameters - assuming that the others will taken by their default values
( simplified this call):
As now in OnInit() of CaVol I placed:
I see in the expert log hundreds and hundreds of until the pc runs out of memory: