This is a small script that tries to assess the probability that a limit order sent at x % from the last close will be filled in the next y bars.
It is based on historical data and can be useful to decide where to place your limit orders and to determine how far from the price you can put the limit order to get an X% chance of getting filled.
It displays this result for both long and short entries and you can specify if you want to fill orders with wicks or not.
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.