You’re waiting until you’re in Trade mode to test your code? This is not good.

You have some troubleshooting to do. Might I offer some suggestions?

1) Test your parser in Test mode first to verify 100% that it actually works. Print the latest five entries and their timestamps to verify. Double check and triple check the documentation regarding the format string.
2) Try the dataParse() function. It has a feature where you can sort data from newest to oldest if the data is actually oldest to newest. The other related dataset functions are quite useful.