Fixed record breaker logic and added tests #363

Merged
scionaltera merged 3 commits from fix-record-breakers into master 2021-03-12 09:59:30 -08:00
scionaltera commented 2021-03-11 16:20:05 -08:00 (Migrated from github.com)

I confused some of the logic in here earlier. Fixed that and added some tests.

This was causing messages to be generated when they were not actually record breakers, and the emojis indicating that prices had "crossed" being shown incorrectly. We only want green checks when the maxSpreadIn is higher than the minSpreadOut, meaning that TradeCombination has a potentially profitable zone.

In the future we'll use that to determine entry and exit points, so it's important to get it right.

I confused some of the logic in here earlier. Fixed that and added some tests. This was causing messages to be generated when they were not actually record breakers, and the emojis indicating that prices had "crossed" being shown incorrectly. We only want green checks when the maxSpreadIn is higher than the minSpreadOut, meaning that TradeCombination has a potentially profitable zone. In the future we'll use that to determine entry and exit points, so it's important to get it right.
lilianchiassai (Migrated from github.com) approved these changes 2021-03-11 18:49:50 -08:00
dazito (Migrated from github.com) approved these changes 2021-03-12 03:06:43 -08:00
Commenting is not possible because the repository is archived.
No description provided.