Artyom Trishkin: You're telling yourself little by little what...
Did you originally look at the function itself???
void NOTIFICATION()
{
int DayT=0,BarTime;
if(DayT!=Day())// Если новый день - нужно опросить
{
DayT=Day();
//......
}
if (BarTime==Time[0]) // Если новый бар - нужно опросить
{
BarTime=Time[0];
//......
}
}
And how areDayT BarTime supposed to change here? They will always be wound 0.
void NOTIFICATION()
{
staticint DayT=0;
staticdatetime BarTime;
if(DayT!=Day())// Если новый день - нужно опросить
{
DayT=Day();
if(Push_On&&DAY_HIGH())SendNotification("ДЕНЬ ЗАКРЫЛСЯ ВЫШЕ ЛИНИИ -" + Symbol());
if(Push_On&&DAY_LOW())SendNotification("ДЕНЬ ЗАКРЫЛСЯ НИЖЕ ЛИНИИ -" + Symbol());
}
if (BarTime==Time[0]) // Если новый бар - нужно опросить
{
BarTime=Time[0];
if(Push_On&&DAY_HIGH()&&PATERN_BUY())SendNotification("ДЕНЬ ЗАКРЫЛСЯ ВЫШЕ ЛИНИИ + ПАТТЕРН -" + Symbol());
if(Push_On&&DAY_LOW()&&PATERN_SELL())SendNotification("ДЕНЬ ЗАКРЫЛСЯ НИЖЕ ЛИНИИ + ПАТТЕРН -" + Symbol());
}
}
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
@Konstantin Nikitin Are you suggesting to take these parameters outside the function body? Or leave them as I wrote in the last screenshot?
Put it on the global level. You will always have them equal to 0, because each time the function is called, a new one will be declared.
Of course, it is outside the function. You are constantly updating and comparing them by calling this function.
You're telling yourself little by little what...
Did you originally look at the function itself???
And how are DayT BarTime supposed to change here? They will always be wound 0.
It will always work as the truth, and
as a lie.
Did you look at the function yourself initially???
And how are DayT BarTime supposed to change here? They will always be 0.You said to put them in global variables. It's enough to make them static, not to put them all in one pile.
It turns out you can also do this????
And if I put them on a global level, they can also be queried from other functions