Backtest issue - page 2

 
parham.trader:

Yes, it is bigger than 2GB

So I'd really appreciate if you kindly guide me about what is the reason of the problem?! I can not find it out ! You guided me to fix my code but I see no explicit problem with it so I'd appreciate if you kindly guide me where do you think the problem come from ?

I don't see how I could guide you without more information as I asked you.

What are the testing dates ? (start/end) What is the size of your fxt file ?

You need to identify if it's a MT4 or a code issue. Try the same testing settings with an other EA (Moving Average provided with MT4 for example).

I didn't understand whether this problem exist on the MT5 as well or it is solved on MT5?

How can we know if an unknown problem also exist in MT5 ?

 
Alain Verleyen:

You need to identify if it's a MT4 or a code issue. Try the same testing settings with an other EA (Moving Average provided with MT4 for example).

Yes,It's a good idea that you should test with another simple EA on that .FXT file,probably it's from that FXT file that has big size,

Anyway we dont have more information about on your side,
 
Alain Verleyen:

I don't see how I could guide you without more information as I asked you.

What are the testing dates ? (start/end) What is the size of your fxt file ?

You need to identify if it's a MT4 or a code issue. Try the same testing settings with an other EA (Moving Average provided with MT4 for example).

How can we know if an unknown problem also exist in MT5 ?

That was great idea, 

The testing date is from 2015.01.12 to 2018.07.20 and the FXT file size are 4.36GB and 4.56GB for EURUSD and GBPUSD respectively.

I just backtest an example EA named "Moving Average" which is a simple EA on the same instruments as I did previuosly - EURUSD & GBPUSD - without any problem and all the testing time range -from 2015.01.12 to 2018.07.20  - was checked perfectly without any problem only in less that one minute of time.

So I guess there would be a problem in my own code, but comparing my code with the example EA named "Moving Average" is not logical because the example EA has a very very simple code but my EA is too complex with numerous .mqh files and numerous functions and numerous call of iCustom function in which any tick must check all nine existing timeframes and each timeframe consists of 6 different setting that should be checked separately.

My question is that how can I check which part of my code consumes the memory extremely so that I could think and find a way to manage that.

 
parham.trader:

That was great idea, 

The testing date is from 2015.01.12 to 2018.07.20 and the FXT file size are 4.36GB and 4.56GB for EURUSD and GBPUSD respectively.

I just backtest an example EA named "Moving Average" which is a simple EA on the same instruments as I did previuosly - EURUSD & GBPUSD - without any problem and all the testing time range -from 2015.01.12 to 2018.07.20  - was checked perfectly without any problem only in less that one minute of time.

So I guess there would be a problem in my own code, but comparing my code with the example EA named "Moving Average" is not logical because the example EA has a very very simple code but my EA is too complex with numerous .mqh files and numerous functions and numerous call of iCustom function in which any tick must check all nine existing timeframes and each timeframe consists of 6 different setting that should be checked separately.

My question is that how can I check which part of my code consumes the memory extremely so that I could think and find a way to manage that.

Honestly I don't understand why you asked such question. If you are able to build such a complex EA, how can it be that you can't debug it ?

 
Alain Verleyen:

Honestly I don't understand why you asked such question. If you are able to build such a complex EA, how can it be that you can't debug it ?

I'm not an expert in programming but worked hard on my EA for some years and developed my knowledge base as needed. My EA is not complex in field of programming techniques, I mean it is complex as it uses numerous functions and .mqh files and complexity of its logic. 

I've never worked with "profiling" but I think that could help finding the memory consuming parts. 

 
parham.trader:

I'm not an expert in programming but worked hard on my EA for some years and developed my knowledge base as needed. My EA is not complex in field of programming techniques, I mean it is complex as it uses numerous functions and .mqh files and complexity of its logic. 

I've never worked with "profiling" but I think that could help finding the memory consuming parts. 

I see.

Eventually, though profiling is mainly about speed, could related or not with memory.

You have to check for memory consumption, arrays, pointers, handles (indicators). 

 
Alain Verleyen:

I see.

Eventually, though profiling is mainly about speed, could related or not with memory.

You have to check for memory consumption, arrays, pointers, handles (indicators). 

So i think you have to use your EA in open price model,so your code would be in open price,open price model is very fast and has very low memory space usage,otherwise you have to

modify something in your code about arrays,indicator using,or checking each timeframe in tick by tick,release or empty the arrays,pointers if uses,or something else that is consuming

the memory a lot,really i dont know how your code is,

Reason: