These lines are called 15 times (approx) every time a new candle is created, each time with a different symbol as its trading a basket:-
double tMA = iMA(symbol, timeframe, MAlen, 0, MAtype, PRICE_CLOSE, shift);
double atr = iATR(symbol, timeframe, ATRlen, shift);
The length values aren't huge (about 50) and the shift is 1.
The memory used by terminal.exe explodes from 200,000kb to well over 1gb, and then adds it on again for the next new candle. If I comment out both these lines then there's no RAM increase at all, but obviously the EA doesn't work. Either line uncommented produces the problem.
I'm missing something simple here, no idea what though ... help please?
EA calling iMA/iATR, has severe RAM issues
- slipshod
- Trader
- Posts: 404
- Joined: Tue Dec 27, 2011 9:14 am
- Location: Australia
EA calling iMA/iATR, has severe RAM issues
Last edited by slipshod on Wed Apr 03, 2013 9:45 am, edited 2 times in total.
-
phil_trade
Re: EA calling iMA/iATR, has severe RAM issues
Have you same problem with another Empty4 or PC ?slipshod wrote:These lines are called 15 times (approx) every time a new candle is created, each time with a different symbol as its trading a basket:-
double tMA = iMA(symbol, timeframe, MAlen, 0, MAtype, PRICE_CLOSE, shift);
double atr = iATR(symbol, timeframe, ATRlen, shift);
The length values aren't huge (about 50) and the shift is 1.
The memory used by terminal.exe explodes from 200,000kb to well over 1gb, and then adds it on again for the next new candle. If I comment out both these lines then there's no RAM increase at all, but obviously the EA doesn't work. Either line uncommented produces the problem.
I'm missing something simple here, no idea what though ... help please?
- slipshod
- Trader
- Posts: 404
- Joined: Tue Dec 27, 2011 9:14 am
- Location: Australia
Re: EA calling iMA/iATR, has severe RAM issues
Nevermind, found the answer. Hint for running basket-trading EAs: don't do it on Empty4 installations where you've downloaded decades worth of history for backtesting purposes! The memory blowout was that history being loaded. And here I was tearing my hair out trying to find a coding problem...