Coding help - page 386

 
apprentice coder:
I am having problems with emails or push notifications (in one build they work in another they don't, and so on...) Is there a way to avoid metarader functions for that completely?

As far as emails are concerned there are some dlls like the one from this post : https://www.mql5.com/en/forum/174385/page227

As of push notifications : haven't seen some dll yet for that

 
mladen:
As far as emails are concerned there are some dlls like the one from this post : https://www.mql5.com/en/forum/174385/page227 As of push notifications : haven't seen some dll yet for that

Thanks

 

Check how the script closes at plus after growing bar with a range of 0.007, closing price more opening price (1 hour chart Eurodollar)

The following data are obtained:

Script_Diapazon EURUSD,H1: all investigated bars=50000

Script_Diapazon EURUSD,H1: the average number of points at the closing of a plus=0.008308835489833627

Script_Diapazon EURUSD,H1: plus how many closings in after a neighbor for 9 bars=541

Script_Diapazon EURUSD,H1: the total number of items in the plus=4.495079999999993

Script_Diapazon EURUSD,H1: all bars with a range of 0.007=622

Launch Advisor, obtained quite different data.

Given that we have about 250 working days, then we get to 6000 hours.

Launch advisor to the month of June 2006.

Profitable trades in the expert «OnTester returns 391.0000000000000»

630 Number of trades.

Explain why such differences advisor and script?

 
QuantF:
Check how the script closes at plus after growing bar with a range of 0.007, closing price more opening price (1 hour chart Eurodollar)

The following data are obtained:

Script_Diapazon EURUSD,H1: all investigated bars=50000

Script_Diapazon EURUSD,H1: the average number of points at the closing of a plus=0.008308835489833627

Script_Diapazon EURUSD,H1: plus how many closings in after a neighbor for 9 bars=541

Script_Diapazon EURUSD,H1: the total number of items in the plus=4.495079999999993

Script_Diapazon EURUSD,H1: all bars with a range of 0.007=622

Launch Advisor, obtained quite different data.

Given that we have about 250 working days, then we get to 6000 hours.

Launch advisor to the month of June 2006.

Profitable trades in the expert «OnTester returns 391.0000000000000»

630 Number of trades.

Explain why such differences advisor and script?

QuantF

Yous script is checking fixed number of 50000 bars

EA does not have that limitation

 
mladen:
QuantF

Yous script is checking fixed number of 50000 bars

EA does not have that limitation

So I set the date of the test EA since 2006 June.

Time schedule from June 2006 contains about 50,000 bars.

Do I something missed ?

 
QuantF:
So I set the date of the test EA since 2006 June.

Time schedule from June 2006 contains about 50,000 bars.

Do I something missed ?

QuantF

Is that exactly 50.000 bars or is it 50.050 or 49.950?

Because in the script it will always test exactly 50.000 bars (that is how that code is written)

 
mladen:
QuantF

Is that exactly 50.000 bars or is it 50.050 or 49.950?

Because in the script it will always test exactly 50.000 bars (that is how that code is written)

In EA about 50,000 bars. The exact number is not known. Data EA and script are very different. Profitable: EA-391, script-541. Even if the number of bars in EA badly misjudged the difference is too great 150 deals.

 
QuantF:
In EA about 50,000 bars. The exact number is not known. Data EA and script are very different. Profitable: EA-391, script-541. Even if the number of bars in EA badly misjudged the difference is too great 150 deals.

Make a simple counter that will check how many bars have been calculated in the EA

If you are testing from the 2006 then the difference in the number of bars can be big. If (and only if) those numbers are similar to 50.000 then you should check the logic used by the script and the EA

 
mladen:
Make a simple counter that will check how many bars have been calculated in the EA If you are testing from the 2006 then the difference in the number of bars can be big. If (and only if) those numbers are similar to 50.000 then you should check the logic used by the script and the EA

Added in the script checks the beginning of the test.

datetime time;

double diapazon;

double max;

int t;

int index;

double raznica;

for(int i=50000;i>0;i--)

{

if (tiket==0){time=Time;}// received time of the first bar

tiket=1;

Vsego_barov=Vsego_barov+1;

diapazon=High-Low;

if (diapazon > D && Close > Open)

{

bigD=bigD+1;

index=i-10;

max=High;

t=iHighest(NULL,0,MODE_HIGH,9,index);

raznica=max-Close;

if (raznica > 0 && Time[t] > Time){priceD=priceD+raznica;KpriceD= KpriceD+1;}

}

}

Received date: EURUSD,H1: time=2006.09.28 00:00:00

launched EA from this date. The number of profitable trades: Expert_Diapazon OnTester returns 385.00000000000000

In the script profitable trades 541

 
mladen:
Make a simple counter that will check how many bars have been calculated in the EA If you are testing from the 2006 then the difference in the number of bars can be big. If (and only if) those numbers are similar to 50.000 then you should check the logic used by the script and the EA

Checked the EA counter:

int tiket;// at the global level

static datetime time;

if (Time[0] > time)

{

tiket=tiket+1;

}

time=Time[0];

With time=2006.09.28 00:00:00. All bars: Expert_Diapazon OnTester returns 49889.00000000000000