Bug in MQ4 for once PerBar situation with Bars (Ver 195, 196, 197)

 

Read the following email from bottom to top.

______________________________________________________

Hello, Shahin

There is really problem. We will fix it.

Thank You very much for your discover.

Best regards, Stanislav Starikov

MetaQuotes Software Corp.

www.metaquotes.net

----- Original Message -----

From: shahin

To: support

Sent: 2006.09.12 20:06

Subject: Re: Re: Bugtrack (MetaTrader, 195)

Hello Tatyana,

Please do you understand me. I have an aunt that can write Russian (I am partly Russian), I can get her to translate this. Do you want translation to Russian?

Yes I already knew what you are saying and I agree 100%. You are not understanding me. What is happening is the opposite. Let me repeat:

I have narrowed this bug to its very few lines of code.

Code WITH comments executes in 24 seconds. Code WIITHOUT comments executes (only 3/4 done) in over 1hour and 10 minutes.

I am a Computer Scientist and Engineer and been in software development for over 24 years.

This happens in Build 195 and 196.

By the way 196 is a lot more cpu & memory intensive than 195 (very bad).

Thank you, and Please reply, Shahin

_____________________________________________

Hello Shahin,

This is not a bug.

1. If you write the code providing comments:

int start()

{

// if(PerBar!=Bars) {

ATR1=iATR(NULL,0,5,1);

// PerBar=Bars;

// }

}

the ATR1 value is calculated for every tick.

2. If you write without comments:

int start()

{

if(PerBar!=Bars) {

ATR1=iATR(NULL,0,5,1);

PerBar=Bars;

}

}

the ATR1 value is calculated for every bar.

The first code will be executed slower than in the second one because the amount of ticks is always equal to or exceeds the amount of bars.

Best regards, Tatyana Vorontsova

MetaQuotes Software Corp.

www.metaquotes.net

----- Original Message -----

From: shahin

To: support

Sent: 2006.09.12 03:32

Subject: Re: Re: Bugtrack (MetaTrader, 195)

Hi Tatyana,

I am waiting. Can you replicate this bug?

Thank you, Shahin

Shahin wrote: Hello again Tatyana,

I just reinstalled my OS and MT4 (196). Same results.

Note: My OS is stable and fine now.

Best, Shahin

Shahin wrote: Hello Tatyana,

Running strategy tester with EURUSD M1 every tick data from Alpari (about two years).

With comments it completed in 24 seconds.

Without comments I stopped it 3/4 of completion and it took 1hour and 10 minutes to get 3/4 done.

This is running on Windows XP Professional with all updates, CPU=1.1 GHz AMD, 385 Meg memory, over 20 Gig Free hard disk. And nothing else running except MetaTrader.

Note: I think this is not related...but I have recently had some problems with my OS.

Please tell me if you can replicate this problem?

Please let me know if you need/want more detail information, I can provide it, no problem.

Thank you, Shahin

MetaQuotes HelpDesk (Tatyana) wrote: Hello Shahin,

Could you, please, provide us with the precise information about the code execution rate?

Best regards, Tatyana Vorontsova

MetaQuotes Software Corp.

www.metaquotes.net

----- Original Message -----

From: Shahin

To: support

Sent: 2006.09.07 06:48

Subject: Bugtrack (MetaTrader, 195)

I sent this yesterday. Saying that backtesting the following on M1 every tick is much much much slower if the code is uncommented (but it should be faster).

***May I please get a reply*** Thank you

int PerBar;

double ATR1;

int start(){

// if(PerBar!=Bars){

ATR1=iATR(NULL,0,5,1);

// PerBar=Bars;

// }

}