Sierra Chart custom study · standard edition · complete reference · v1.0
Position Size Calculator
The standard edition: one entry, one stop, one target, and five buttons. Everything the study does, every setting it exposes, and how it differs from the Pro edition — written to be the source material for a sales page, a customer manual and a support desk.
- Version
- 1.0
- Platform
- Sierra Chart 64-bit, Windows. Built and tested on v2800
- Delivered as
- PositionSizeCalculatorStandard_64.dll
- Dependencies
- None — one self-contained file
- Settings
- 39 inputs, 8 groups
- Order routing
- None. It never touches an order.
1What it is
The one-paragraph version, for the top of a sales page.
A pre-trade position sizing tool for Sierra Chart, drawn directly on the chart and modelled on TradingView's long/short position tool. Set your position size, place an entry, a stop and a target, and it tells you exactly what the trade risks in money, what it pays, and the reward-to-risk ratio — net of commission.
It is anchored to a candle, so it stays where you put it as new bars print, which makes it a record of a trade you took as much as a plan for one you are considering. And it is driven from the chart — grab a handle, press a button on the box itself — rather than from a settings dialog.
This is the standard edition. It does one job with no menus to learn: one target, one way of sizing, five buttons. The Pro edition is the same engine with up to four targets, and two further sizing modes that hold risk constant or solve the contract count from a risk amount. Section 11 lays the two out side by side.
It never places, modifies or cancels an order, and it needs no trading connection to work. Worth stating prominently: it reassures cautious buyers, and it sets expectations for the ones hoping it will submit brackets.
2Anatomy on the chart
The box
Two filled bands: a risk band from the entry to the stop, and a reward band from the entry to the target. They meet exactly at the entry, and each carries a solid border, so the band edges are the levels — there are no separate lines to style or misalign.
The box begins one bar right of the anchor candle and extends as far right as you drag it. With Box: Width at 0 it sizes itself to the widest label with a little air either side, and it will never be narrower than its own text.
The handles
| Handle | Drag it | What happens |
|---|---|---|
| Entry | Any direction | Vertically, the whole setup moves and every distance is preserved. Horizontally, the tool re-anchors to whichever candle you drop it on — box width included. |
| Stop | Vertically | Sets the stop distance. |
| Target | Vertically | Sets the target distance. |
| Width | Horizontally | On the box's right edge, mirroring the entry handle. Sets how far right the box reaches. Works in the empty space past the last candle. |
Nothing can be dragged across the entry — a stop cannot become a target by accident. Direction changes only through the flip button.
3How the money is calculated
You set the size and place the levels; risk, reward and the ratio are the outputs. Commission is round-turn, per contract.
StopTicks = |Entry − Stop| / TickSize
TargetTicks = |Target − Entry| / TickSize
Risk = Quantity × (StopTicks × TickValue + Commission)
Reward = Quantity × (TargetTicks × TickValue − Commission)
R:R = Reward / Risk // net of commission on both sides
The ratio is taken from the net money figures rather than from raw tick counts. With commission at zero the two are identical; set commission to $4 and a gross ratio would contradict the two currency amounts printed beside it.
The + and − buttons step the position size by Sizing: Size Step, never below one contract and never above Sizing: Maximum Position Size. Every figure on the labels updates on the press.
4What the labels say
Exact formats, so a manual can reproduce them and support can recognise them.
| Label | Format | Example |
|---|---|---|
| Stop | Stop {ticks}t -{cur}{risk} | Stop 33t -$330.00 |
| Target | Target {ticks}t +{cur}{reward} | Target 36t +$360.00 |
| Entry | Size : {qty} - RR : {ratio} | Size : 8 - RR : 1.09 |
All three labels are padded to a common character count so they share one width and sit centred in the box. That only produces equal pixel widths in a monospaced face, which is why the default is Consolas and why the input is named to hint at it.
5The five buttons
One row under the box, in one of two states. There are no menus.
| Glyph | Colour | Action | Shown | Setting for its colour |
|---|---|---|---|---|
| X | Red | Hide the tool, preserving every setting | Always | Buttons: Hide Button Color |
| H | Blue | Switch between the full view and the clean view | Always | Buttons: Handles Button Color |
| ↕ | Green | Flip the setup between long and short | Full view | Buttons: Flip Button Color |
| + | Button grey-blue | Position size up by one step | Full view | Buttons: Background Color |
| − | Button grey-blue | Position size down by one step | Full view | Buttons: Background Color |
H is a single switch for reading the chart rather than editing the trade. Pressed, it takes the grab handles off the chart and the three controls that act on the setup — flip, +, − — off the row, leaving X and H beneath the box. Pressed again, everything returns. No level, size, direction or anchor is touched in either direction, and the state survives hiding the tool with X.
It follows that the setup cannot be edited in the clean view: with no handles there is nothing to drag, and with no + or − the size is fixed. That is the point of it, but it is the one thing a new user may need told once.
The flip glyph is an input, so a customer whose font lacks the symbol can type any character they like into it. The default face is Segoe UI Symbol; Consolas does not carry the arrow.
The row is painted in real screen pixels through a GDI callback rather than drawn as chart objects anchored in price and time. Chart-space cells cannot be made square, and their spacing drifts as you zoom. The painter records the rectangle it drew for each cell, and the click handler tests those exact rectangles, so what you see and what you can press never disagree.
6Moving and hiding it
Three ways to place it
- Drag the entry handle. The whole setup travels, box width included, and re-anchors to the candle you drop it on. This is the everyday gesture.
- Right-click the chart and choose Position Size Calculator. It lands at the exact point you clicked — that candle, that price — carrying your stop and target distances with it. It also brings the tool back if you have hidden it.
- Drag it past the last candle. The empty space to the right is fair game, for a level you are waiting on. The width handle keeps working out there.
Hiding preserves everything
The red X takes the tool off the chart and keeps the contract count, direction, stop and target distances and box width. Right-click to bring it back exactly as you left it. The blue H is a lighter version of the same idea: it leaves the box on the chart but strips it back to a clean view — no handles, and only X and H in the row.
7Adapting to any instrument
The study reads Tick Size and Currency Value Per Tick from the chart it sits on, so it works on any instrument the platform can chart without configuration.
That makes one chart setting load-bearing for every figure the tool reports. If Currency Value Per Tick is wrong, nothing errors — every number simply scales by the same factor and still looks plausible. The classic case is trading micros on a chart configured for the full-size contract: ES is 12.50, MES is 1.25, so risk is reported ten times too large.
| Instrument | Tick size | Value per tick |
|---|---|---|
| ES — E-mini S&P 500 | 0.25 | $12.50 |
| MES — Micro E-mini S&P 500 | 0.25 | $1.25 |
Where a chart's values cannot be corrected, Symbol: Tick Size Override and Symbol: Currency Value Per Tick Override take precedence; both are 0 = use the chart setting. If the chart reports a zero tick value, the study writes a warning to the Message Log naming the symbol rather than silently drawing nothing.
What was verified, and how
On 3 September 2026 both editions were audited line by line for anything that assumes a particular instrument. The findings and their fixes:
| Checked | Result |
|---|---|
| Hardcoded tick size, tick value or price constant | None anywhere. Every figure derives from the chart's two symbol settings or from an input. |
| Division by zero | Every divisor guarded. Tick size and tick value are checked once at the top and the study returns with a Message Log entry rather than drawing wrong numbers; quantity, weight sums, per-contract cost and bar pitch each have their own guard. |
| Negative and zero prices | Eight places assumed a positive price and were rewritten. Spread charts and back-adjusted continuous contracts both print negative prices routinely, and CL itself traded below zero in April 2020. The tool now places, restores, draws and positions its buttons correctly at any price, above or below zero. |
| Sanity checks that used a ratio of price | Replaced with distances measured in the instrument's own ticks. A ratio is meaningless when a price can be negative or near zero; a tick count means the same thing on every instrument. |
| Tick-size range | Nothing depends on the magnitude. The scale spans roughly five orders of magnitude across the instruments the platform charts — from a thirty-second of a point on the bond futures down to fractions of a pip on the currency futures — and the arithmetic is identical at either end. |
| Price and money formatting | Labels quote tick counts and money, never a raw price, so nothing depends on the instrument's decimal places. The currency prefix is an input. |
| Bar spacing | Measured from the chart's own bars, with a fallback when a bar duration cannot be derived. Works on time, tick, volume, range and Renko charts. |
| Charts with too few bars | The study returns before touching the bar arrays when fewer than two bars are loaded. |
| Switching the chart to another symbol | Found and fixed. The study instance, its remembered values and its grab handles all survive a symbol change, and the old handles were being read back as though the user had dragged them — which mixed one symbol's levels with another's. The tool now detects the change, clears every drawing from the previous symbol, and places itself fresh on the new one with all settings kept. |
8Complete settings reference
All 39 inputs, in the order they appear in the study's settings window. Each carries a description shown in the platform when you select it.
| # | Setting | Default | Range | Notes |
|---|---|---|---|---|
| Sizing | ||||
| 2 | Position Size | 8 | 1 – 1,000,000 | The + and − buttons step it |
| 3 | Maximum Position Size | 100 | 1 – 1,000,000 | Guard against one + press too many |
| 4 | Size Step For + / − Buttons | 1 | 1 – 10,000 | Contracts per press |
| 6 | Round-Turn Commission Per Contract | 0.00 | 0 – 10,000 | Added to risk, subtracted from reward. R:R is net. |
| 7 | Currency Symbol | $ | text | Prefixes money on the labels |
| 8 | Starting Stop Distance (Ticks) | 20 | 1 – 100,000 | Used when the tool is first placed |
| Target | ||||
| 11 | Starting R Multiple | 2.0 | 0.1 – 100 | Where the target sits at first placement, as a multiple of the stop distance |
| Box | ||||
| 20 | Width (Bars, 0 = fit to labels) | 0 | 0 – 100,000 | A starting point only; the right-edge handle owns it afterwards |
| 21 | Reward Fill Color | 0,128,64 | colour | Sets the band's border colour too |
| 22 | Risk Fill Color | 185,0,0 | colour | Sets the band's border colour too |
| 23 | Fill Transparency (0-100) | 72 | 0 – 100 | 0 solid, 100 invisible |
| Labels | ||||
| 30 | Show | Yes | Yes / No | |
| 31 | Text Size | 10 | 4 – 60 | Points |
| 32 | Font Face (blank = chart font) | Consolas | text | Monospaced keeps every label the same width |
| 33 | Text Color | 255,255,255 | colour | |
| 34 | Entry Background (Size / R:R) | 100,106,119 | colour | Also colours the entry and width handles |
| 35 | Stop Background | 200,66,66 | colour | Also colours the stop handle |
| 36 | Target Background | 56,160,105 | colour | Also colours the target handle |
| 37 | Offset From Line (Ticks) | 0 | 0 – 1,000 | Lifts a label clear of its edge |
| Handles | ||||
| 40 | Marker Shape | Triangle Left | 8 options | Triangle Left, X, Plus, Square, Diamond, Star, Point, Dash |
| 41 | Size | 18 | 2 – 60 | Bigger is easier to grab |
| 42 | Gap From Box (Bars) | 1 | 1 – 200 | How far left of the box they sit |
| 43 | Snap Entry To Candle | Yes | Yes / No | No allows free horizontal placement |
| Buttons | ||||
| 50 | Show On-Chart Buttons | Yes | Yes / No | Pointer events are only requested while this is on |
| 51 | Cell Size (Pixels) | 40 | 10 – 200 | Cells are square |
| 52 | Gap Between Cells (Pixels) | 8 | 0 – 40 | |
| 53 | Offset From Box Left Edge (Pixels) | 0 | 0 – 2,000 | |
| 54 | Offset Below Lowest Level (Pixels) | 24 | 0 – 2,000 | Raise it if the bottom label overlaps |
| 55 | Text Size | 15 | 5 – 60 | Points |
| 56 | Font Face | Segoe UI Symbol | text | Must carry the flip arrow |
| 57 | Background Color | 140,146,159 | colour | The + and − faces. A lighter shade of the entry label by default. |
| 58 | Text Color | 255,255,255 | colour | |
| 59 | Handles Button Color | 106,155,204 | colour | The H |
| 60 | Hide Button Color | 200,66,66 | colour | The X |
| 66 | Flip Button Color | 56,160,105 | colour | The up-down arrow. Same index and default in the Pro edition. |
| 65 | Symbol – Flip Long/Short | ↕ U+2195 | text | Any character your font carries |
| Symbol | ||||
| 70 | Tick Size Override | 0 | 0 – 1e6 | 0 = use the chart setting |
| 71 | Currency Value Per Tick Override | 0 | 0 – 1e6 | 0 = use the chart setting |
| Advanced | ||||
| 80 | Drawing Line Number Base | 780000 | 1,000 – 2e9 | Pro uses 790000, so both editions can share a chart at their defaults |
9Troubleshooting
Symptom first, because that is what a customer arrives with.
| Symptom | Cause | Fix |
|---|---|---|
| The study isn't in the Studies list | The DLL is in the wrong folder, or Sierra Chart was running when it was copied in | Close Sierra Chart fully, put the file directly in \Data\, start again |
| Every money figure looks ten times too big or small | The chart's Currency Value Per Tick belongs to a different contract — the micro-on-a-full-size-chart case | Correct it in Chart Settings › Symbol, or set Symbol: Currency Value Per Tick Override |
| The buttons don't respond | A drawing tool is the active tool. Sierra Chart only delivers mouse events to a study when Pointer, Chart Values or Hand is active | Select Tools › Pointer. Platform behaviour, not a setting. The right-click menu always works. |
| The flip button shows an empty box | The chosen font doesn't carry the arrow | Set Buttons: Font Face to Segoe UI Symbol, or type any character into Buttons: Symbol – Flip Long/Short |
| The bottom label overlaps the buttons | Not enough clearance for the label size in use | Raise Buttons: Offset Below Lowest Level (Pixels) |
| I can't find it on the chart | It's anchored; if you've scrolled forward it may be off to the left | Right-click where you want it and choose Position Size Calculator |
| The handles are gone, and so are the flip and +/− buttons | The blue H button was pressed — that is the clean view | Press H again. No settings were changed. |
| A level won't cross the entry | By design — a stop cannot silently become a target | Use the flip button to change direction |
| + stops working at some size | Sizing: Maximum Position Size has been reached | Raise it. It exists to catch one press too many. |
| Two copies on one chart interfere | Both address the same chart drawing numbers | Give the second a different Advanced: Drawing Line Number Base — 770000, for example |
| The box is wider or narrower than expected | Box: Width is 0, so it fits itself to the widest label | Drag the right-edge handle, or set an explicit width |
| It re-placed itself after I changed the chart's symbol | By design: a new symbol gets a fresh placement at its own current price, with every setting kept | Expected. Drag the handles to where you want them on the new symbol. |
| I want more targets, or the size solved for me | Not in this edition | That is the Pro edition — see section 11 |
10Limits worth disclosing
A buyer who reads these first sees honesty; a buyer who discovers them first sees a bug.
| Limit | Status | Detail |
|---|---|---|
| Buttons need the Pointer tool | Platform | ACSIL receives mouse events only when Pointer, Chart Values or Hand is active. Unfixable. The handles and the right-click menu are unaffected. |
| One target, one sizing mode | By design | The defining difference from Pro. Say it plainly on the product page so nobody buys the wrong edition. |
| Two instances need different line bases | Open | Documented rather than prevented. Deriving the base from the study instance ID would remove the trap. |
| Equal label widths assume a monospaced font | Open | Padding is to a character count. A proportional face gives ragged widths. |
| Forward-space width on non-time bars | Open | Right of the last candle there are no timestamps, so position is projected from the last bar's duration. Exact on time bars; drifts slightly on trade-count, volume, range and Renko charts. |
| Not yet run on an unfamiliar instrument | Open | Audited in full for instrument assumptions (section 7) and none remain, but it has only been watched on ES and MES. |
11Standard vs Pro
Same engine, same drawing, same handles. The differences are exactly these.
| Capability | Position Size Calculator | Position Size Calculator Pro |
|---|---|---|
| Targets | One | Up to four, each with its own share of the position; contract count per target shown on its label |
| Sizing | You set the size; risk and reward are calculated | That, plus Fixed Risk (risk held constant, stop and targets move to keep it) and Auto Size (place the stop, the contract count is solved from your risk amount) |
| Buttons | One row: X, H, flip, +, − | Two rows — X, H, flip, +, − then the three modes and T+ — plus a share row per target once there is more than one |
| Settings | 39 | 55 |
| Anchoring to a candle | Both | |
| Grab handles, width handle, forward-space placement | Both | |
| Right-click placement at the click point | Both | |
| Hide with X, preserving all settings | Both | |
| Net-of-commission R:R | Both | |
| Tick size and tick value overrides | Both | |
| Never touches an order | Both | |
| Line-number base | 780000 | 790000 |
| DLL | PositionSizeCalculatorStandard_64.dll | PositionSizeCalculatorPro_64.dll |
| Right-click menu entry | Position Size Calculator | Position Size Calculator Pro |
The standard edition is for someone who already knows their size and wants to see what a stop and target cost, on the chart, without learning anything. Pro is for someone who scales out, or who wants the size solved from a risk budget — the question a position size calculator is named after. Both can be installed side by side and used on the same chart.