I know some software has this feature, for example X_TRADER has something called EPIQ which calculates your position in the queue if you submitted a limit order. I use NinjaTrader mainly, and I plan on making an indicator that does just this, since NT doesn't have the feature. So does anyone know the mathematical formula for such a calculation?