The days online count resets to 1 after all active trades are cleared, this should maintain a count of all days online since the first trade in the history file
Question is closed for new answers.
admin Selected answer as best
As new trade records were added to the trade history table they were being added with new index values starting from 1 causing the earliest trade to be seen as the one with the lowest index value. Code was modified to reindex the table before the earliest value was selected.
admin Selected answer as best