mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-28 11:51:47 +08:00
5373b6797c
Stop and limit prices both trigger when a price crosses some threshold, but they trigger in "opposite directions". For example, on a buy, a limit price is triggered when a price falls below a specified value, whereas a stop price triggers when the price exceeds a specified value. Our current stop/limit price rounding logic is asymmetric, preferring to "round to improve" the specified price. This change makes it so that we interpret "improvement" in opposite directions for stop vs limit prices.