Reference sample for NinjaTrader 6.5.xxxx.x or greater.
When NinjaTrader receives a request to submit an order, it automatically rounds any limit price or stop price to the nearest tick for that specific instrument. When debugging and/or printing out order information, this may not be apparent. NinjaTrader includes a callable function named Round2TickSize to apply the same internal rounding to any value you wish, which can help make comparisons easier.
This reference sample demonstrates the following concepts:
- Rounding a value to the nearest tick
Important methods and properties used include:
Other methods and properties of interest include:
Import instructions for NinjaTrader 6.5.XXXX.X or greater:
- Download the file contained in this thread to your PC desktop
- From the Control Center window, select the menu File > Utilities > Import NinjaScript
- Select the downloaded file