Ameobea / algobot3

Third iteration of the algorithmic trading bot I've been working on.
5 stars 0 forks source link

Erroneous Price Calculations #5

Closed Ameobea closed 8 years ago

Ameobea commented 8 years ago

During the limited test of live data performed, one strange price calculation showed up that was completely off: https://ameo.link/u/0bf0079b8d3b98c4d49d8bf8d65928ac55439099.png

Raw tick logging should be re-enabled in order to allow this to be debugged, and perhaps code-level logging should be in place for calculated prices/averages/smas that are outside of normal ranges.

Ameobea commented 8 years ago

I'm fairly sure that these are due to a race condition somewhere in tick_generator. I suspect that the list that stores queued ticks is being accessed/changed during the period of time in which price calculations are being made/stored.

Ameobea commented 8 years ago

A while ago I fixed a small issue with one of the queues in which ticks were being sent through during the price average calculation process. The data types were messed up and possibly could have caused ticks of different symbols to be calculated together.

This has since been remedied, at least in part as far as I can tell so I am closing this issue until such a time that it comes up again.