Function on calculate
Hi experts, I have aproblem in an indicator.
I just want to compare a time in hour in on canculate function, but I don't know what is the format I must use, some help will bem welcome.
thanks,
for(int i=4; i<rates_total; i++)
{
if time[i] = 09:00:00
{
CompraBuffer[i]=low[i];
}
else
{
CompraBuffer[i]=0;
}
Hello,
Do it like this:
if (time[i] >= D'2018.07.25 09:00:00') { ... }
Atention 1: you are using equal signal as atribution. This is atribution "=", this is comparation "==".
Atention 2, if you use equal signal (==) to check the time, you have to have a tick with exactly the same date / time conted in seconds.
Hi experts, I have aproblem in an indicator.
I just want to compare a time in hour in on canculate function, but I don't know what is the format I must use, some help will bem welcome.
thanks,
for(int i=4; i<rates_total; i++)
{
if time[i] = 09:00:00
{
CompraBuffer[i]=low[i];
}
else
{
CompraBuffer[i]=0;
}