Can you tell me how to do this? I wrote a notification function and the notifications come on every tick! The function itself is just written in int Start. PATTERN conditions on M30.
///--------------------------------------------------------------------------------------------/// ФУНКЦИЯ ОТПРАВКИ УВЕДОМЛЕНИЙ///--------------------------------------------------------------------------------------------void NOTIFICATION()
{
int DayT=0,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());
}
}
Can you tell me how to do this? I wrote a notification function and the notifications come on every tick! The function itself is simply written in int Start.
Can you tell me how to do this? I wrote a notification function and the notifications come on every tick! The function itself is just written in int Start. PATTERN conditions on M30.
int DayT=0;
datetime BarTime=TimeCurrent();void NOTIFICATION()
{
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());
}
}
You declare variables and immediately compare with them. Of course you always get the same result.
@Konstantin Nikitin Hello!!! Fixed it!!! Daily signals are up! Still need to check the intraday ones!
Fixed! Here:
///--------------------------------------------------------------------------------------------/// ФУНКЦИЯ ОТПРАВКИ УВЕДОМЛЕНИЙ///--------------------------------------------------------------------------------------------void NOTIFICATION()
{
staticint DayT=0;
datetime 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());
}
}
Let me put it another way. How can you determine the maximum price in the last 10 seconds?
In MT5 - CopyTicks()
In MT4 - save ticks in array of structures MqlTick. From it, take max/min prices.
Can you tell me how to do this? I wrote a notification function and the notifications come on every tick! The function itself is just written in int Start. PATTERN conditions on M30.
Can you tell me how to do this? I wrote a notification function and the notifications come on every tick! The function itself is simply written in int Start.
@Artyom Trishkin Thank you! Interesting came out now it's quiet at all!
Can you tell me how to do this? I wrote a notification function and the notifications come on every tick! The function itself is just written in int Start. PATTERN conditions on M30.
You declare variables and immediately compare with them. Of course you always get the same result.
It's hard to read the code on a mobile. There must be something else wrong with it.
I think it should have gone like this
datetime BarTime;@Konstantin Nikitin Hello!!! Fixed it!!! Daily signals are up! Still need to check the intraday ones!
Fixed! Here:
@Konstantin Nikitin Hello!!! Fixed it!!! Daily signals are up! Still need to check the intraday ones!
Fixed! Here:
Take it to the global level. You will always have them equal to 0, because each time the function is called, a new one will be declared.