Adding Start-of-Day/End-of-Day Features to Greek Engine

High-Tech Greek Engine

Now that things are getting a little more stable mid-day, it's time to start addressing the all-important start-of-day and end-of-day edge cases for my Greek Engine. For example, I really need to add in the code to reset close price, open price, high price and low price for all instruments right before the open. That way, when the trading day (soon) starts, we'll be able to correctly deal with the trades updating these values. If we don't, then we'll get "bleed over" from the previous day, and while I was just trying to get things to work, it was OK, now we're raising the bar and trying to match the existing system more.

At the end of the day we have similar logic for the close price. We need to look at a snapshot of the last trade price at 3:02 pm, and then look for updating information from the summary messages coming from the exchanges. It's pretty simple, and I'll admit not all that complex, but it's necessary as we take the Greek Engine to the next level and really try to make it match the data in the legacy systems.

Nice to get to this level of coding. Not so much about crashing bugs, but nice little tweaks to the logic to make it really nice for the users.