
- www.mql5.com
Well, it really just is the iATR indicator, with a Period of between 50 and 500 on a 15 Min Chart...
Then I'd be interested to know what might be wrong with this simple script.
Because it crashes with a "too low memory" error when tested in EURUSD, 15Min, 01/01/08 till 12/31/12 pretty soon.
Just a simple demonstration of my problem. Can you reproduce it?
//+------------------------------------------------------------------+ //| TestEA.mq5 | //+------------------------------------------------------------------+ int h_atr; datetime lastbar; int OnInit() { h_atr=iATR(_Symbol,_Period,100); if(h_atr==INVALID_HANDLE){return -1;} MathSrand(10); return(INIT_SUCCEEDED); } void OnDeinit(const int reason) { } void OnTick() { datetime now[1]; if(CopyTime(_Symbol,_Period,0,1,now)<1){return;} if(now[0]==lastbar){return;} lastbar=now[0]; int period=(int)MathFloor(MathRand()/1000+50); if(h_atr!=INVALID_HANDLE){IndicatorRelease(h_atr);} h_atr=iATR(_Symbol,_Period,period); }
Then I'd be interested to know what might be wrong with this simple script.
Because it crashes with a "too low memory" error when tested in EURUSD, 15Min, 01/01/08 till 12/31/12 pretty soon.
Just a simple demonstration of my problem. Can you reproduce it?

- www.mql5.com
So I wrote it to the Service Desk. Any experience, on how fast they answer? So I get a response, once my bug was at least noticed?

Then I'd be interested to know what might be wrong with this simple script.
Because it crashes with a "too low memory" error when tested in EURUSD, 15Min, 01/01/08 till 12/31/12 pretty soon.
Just a simple demonstration of my problem. Can you reproduce it?

- 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 have the following problem:
in one of my EAs, I want to change the lookback period of an indicator, depending on market conditions.
I thought
if(h_ind!=INVALID_HANDLE){IndicatorRelease(h_ind;}
h_ind=iCustom(...)
should do the trick.
However, I constantly run into "out of memory" errors, no single cloud agent finishes it's job, and so on.
Do I have to, or can I manually not only release the indicator, but also the memory it used?
I really don't understand, what's not working for me.
Thanks in advance,
Clock