Micro and Mini Mix for Closest Risk
Futures traders who size in whole mini contracts often leave a large part of their risk budget unused. This script finds the count of minis and micros that comes closest to your dollar risk without going over it, and shows the result in a small table.

What it shows
- A table in the indicator pane with two rows: minis only, and the closest mix.
- Each row lists the mini count, the micro count, the risk used and the risk left unused.
- A title row with your risk and the stop distance in points.
- A red message in place of the rows if risk, stop or a point value is zero.
How it works
Risk for one mini is the stop in points times the mini point value. Risk for one micro is the stop in points times the micro point value.
The script tries mini counts from the most that fit under your risk down toward zero, up to 5000 counts below the top. For each one, it fills the leftover risk with as many whole micros as fit. It keeps the mix with the least unused risk and stops early if a mix uses the risk exactly. If two mixes tie, the one with more minis wins.
The stop is the number you type in Stop in points. If you set it to 0, the stop is the ATR times ATR multiple for auto stop, using ATR length for auto stop. The ATR value comes from the last closed bar, so it does not move while the current bar forms.
The table is drawn on the latest bar and dollar figures are rounded to whole dollars.
How to use it
- Set Risk in dollars to the most you will accept losing on the trade.
- Set Stop in points to the distance from your entry to your stop, or leave it at 0 to use ATR.
- Set Mini point value and Micro point value for your contract. The defaults are 20 and 2, which match NQ and its micro. Use 50 and 5 for ES, or 100 and 10 for gold.
- Read the Closest mix row for the mini and micro counts.
- Pick a table position if the default corner is in the way.
Why it is different
It fills the risk left after the whole minis with micros, and puts the minis only row beside the closest mix so you can see how much risk the micros recover.
Limits
- Defaults are placeholders: a risk of 1000 dollars, a stop of 25 points and the NQ values. Change them to match your trade.
- The mini to micro ratio comes from the two point values you enter. The script does not look up contract specs.
- Fees, slippage and gaps through the stop are not included.
- With ATR as the stop, the result changes with the chart timeframe.
- The stop is in the price units of the chart symbol. On a symbol that is not the futures contract you size, the table is only arithmetic on the numbers you type.
- It draws on the chart only. It places no orders and is not advice about any trade.