Questions from Beginners MQL5 MT5 MetaTrader 5 - page 653

 
Karputov Vladimir:
Where does this message pop up? What exactly are you trying to do?
Is it in theMQL5 Strategy Tester Agent, what should I do to make it work?
Скачать MetaTrader 5 Strategy Tester Agent для работы в сети MQL5 Cloud Network
Скачать MetaTrader 5 Strategy Tester Agent для работы в сети MQL5 Cloud Network
  • cloud.mql5.com
Подключайтесь к сети распределенных вычислений MQL5 Cloud Network и получайте дополнительный доход круглосуточно — пусть компьютер работает на вас!
 
pako:

This is no longer a fractal

the lower fractal, the low of the previous candle should be higher than the fractal

if low is higher than fractal, high is even higher

Screenshots from MetaTrader platform

EURUSD, M5, 2016.10.26

MetaQuotes Software Corp., MetaTrader 5, Demo

EURUSD, M5, 2016.10.26, MetaQuotes Software Corp.

Here's what to look for. Place a dot on a ticked candle. At the moment of putting a point on a ticked candlestick, the fractal will not be set, and it is not needed. If it is needed, it can be done as well.
 
Ласло Подобедов:
It is in theMQL5 Strategy Tester Agent test solution application, what should I do to make it work? enter my nickname in the last tab and that's it?
Enter LOGIN and PASSWORD from MQL5.community.
 
Alexey Kozitsyn:
This is what you need to find. Put a point on the ticked candle. There will be no fractal on the ticked candle at the time of dotting, and it is not needed. If it is needed, it can be done.

Read what a fractal is

if( High[i+1]==Low[isFractalDn()])

Can this condition be fulfilled?isFractalDn =i

 
pako:

Read what a fractal is

You'd better reread what you need to find.
 
Alexey Kozitsyn:
You'd better reread what you need to find.
if( High[i+1]==Low[isFractalDn()])

isFractalDn = i

We should find that the high of the previous candle from the lower fractal is equal to the low of the lower fractal

it cannot be so because

the low of the lower fractal, both preceding candlesticks have the low higher than the low of the fractal

 
pako:
if( High[i+1]==Low[isFractalDn()])

isFractalDn = i

This is wrong. isFractalDn() (if it is written correctly of course) should return the number of the first lower fractal candle.

And the first fractal should be looked for not earlier than on the 2nd candle. According to the mila.com conditions it should be searched till the 10th candle.

I think I understand what misled you. The visibility area i. Here is one area of visibility:

if( High[i+1]==Low[i+isFractalDn()])
       {
       ExtMapBuffer3[i]=High[i+1];
       }

Here is another:

//эта функция за пределами старт
int isFractalDn()
{
for(int i=0; i != 10; i++)
{
if(iFractals(NULL, 0, MODE_LOWER, i)!= NULL) return(i);

}
return(-1);
}

In this case - the scope is within the for loop.

 
Alexey Kozitsyn:

This is wrong. isFractalDn() (if it is written correctly, of course) should return the number of the first lower fractal candle.

And the first fractal should be looked for not earlier than on the 2nd candle. According to the mila.com conditions it should be searched till the 10th candle.

I think I understand what misled you. The visibility area i. Here is one area of visibility:

if( High[i+1]==Low[i+isFractalDn()])
       {
       ExtMapBuffer3[i]=High[i+1];
       }

Here is another:

//эта функция за пределами старт
int isFractalDn()
{
for(int i=0; i != 10; i++)
{
if(iFractals(NULL, 0, MODE_LOWER, i)!= NULL) return(i);

}
return(-1);
}

In this case - the scope is within the for loop.

If high is searched in another loop then why ?
High[i+1]
And which way is it searched? To the right or to the left?
 
pako:
If high is searched in a different cycle then why ?
High[i+1]
And which way is it searched? To the right or to the left?
They didn't let us see the whole indicator, but it's certain that it's in the other one.
 
Alexey Kozitsyn:
They didn't let us see the whole indicator, but it's definitely in the other one.

Apparently I misunderstood (

If otherwise:

The bar number of the lower fractal is known

From it look for the first high corresponding to the low of the known fractal in the loop

Reason: