A simple NinjaTrader 8 indicator for quick and precise position sizing based on your desired risk per trade and stop distance. Built for professional discretionary futures traders who prefer clear, rule-based risk management. Ideal for fast scalping as well as any kind of position sizing based on market entries.
- Calculates optimal position size based on:
- Fixed risk amount (in account currency)
- Stop-loss distance (defined by chart line)
- Instrument tick value
- Automatically fills the Chart Trader → QTY field
- Displays position size and risk information directly on the chart
- Automatically references the Ask price for long trades (stop below market) and the Bid price for short trades (stop above market)
- Lightweight, zero-dependency, and open-source
- Download
FixRisk.cs - In NinjaTrader:
- Go to New → NinjaScript Editor
- Right-click the Indicators folder → New Indicator
- Press Generate
- Remove all default code
- Paste the contents of
FixRisk.cs - Press the Compile button
at the top of the NinjaScript Editor window - After compilation, add FixRisk to your chart
The red line represents your imaginary stop-loss for the calculation. If you place a market order and set your actual stop exactly at that line, a stop-out will result in a loss equal to the risk amount you specified in the indicator settings.
- Set your desired risk per trade (in account currency)
- Position the red line where your stop-loss would be
- The indicator automatically:
- Calculates and displays the optimal position size on the chart
- Updates the Chart Trader’s QTY field accordingly
This project is licensed under the MIT License.
Norbert Szabo
CTO / dev / part-time trader
