Originally Posted By: jcl
I don't know if this is the reason, but you're not printing "seconds" correctly. TradeVar is a var, not an int, so you must print it with %f, not %d.


Thanks for your response jcl. Indeed I changed the printf, now it is

seconds = second();
printf("\nseg: %f\n",seconds);

but it prints "seg: 0.000000" moreover look at what it prints when i invoke

printf("\nLong %d entered at: %d/%d/%d %d:%d:%d\n",TradeID,day(),month(),year(),hour(),minute(),second());

second() returns an int but it is always returning 0 so I think the problem is that second is bugged or the tmf is not being called every tick. Is the code of second() available to check?