I've this logic in my strategy and the "diff" in time between 2 bars is printing properly. I'm trying to have a bool where if the time between bars is less than 5 seconds my bool would be false, otherwise true. I get an error code CS0019 saying I can't use "<" for TimeSpan and int for this part of the code: if (diff < 000005). How do I resolve this?
TimeSpan diff = Times[2][0] - Times[2][1];
Print ("Time difference: "+diff);
if (diff < 000005)
{
barok = false;
}

Comment