If a user places a pending Buy limit order above the current price or a pending Sell limit order below the current price, the order will be opened immediately in the market.
But it is clear that the user did not plan to open a market order if he specified a different price. I just set the order type incorrectly.
In such situations, I suggest issuing a warning such as “Your order will be opened at the current price.
If you want to open a pending order, choose a different order type.”
Or, even better, automatically open an order type that will not be opened at the market, but at a price specified by the user.
It's just that I've already been in this situation dozens of times due to inattention.
I move the order on the chart, for example, Buy above the current price to make it break.
And the terminal automatically makes it limited and opens at the current price. The result is a small loss.
·