Round Number
The Round Number indicator places orders at the two round prices that bracket the bar's open — for example 1.2000 and 1.2100 on a 5-digit symbol with Digits 2. Round levels are where resting orders cluster, so a break of one is often the moment the move accelerates.
Role in the strategy
| Slot | Available | Role |
|---|---|---|
| Entry Point | Yes | Enters at the higher or the lower round number. |
| Entry Rule | No | — |
| Exit Point | Yes | Exits at the higher or the lower round number. |
| Exit Rule | No | — |
It is a point only indicator: it produces order prices and no rule lines. "Enter long at the higher round number" rests the long order at the upper level and the short one at the lower; "Enter long at the lower round number" swaps them — the two lines are the two directions of a bracket trade.
As an exit point it places resting orders the bar reaches, so it carries no Exit Rules. Only Bar Open and Bar Close allow them.
Logic rules
| Rule | Long order price | Short order price |
|---|---|---|
| Enter/Exit long at the higher round number | higher round number + shift | lower round number − shift |
| Enter/Exit long at the lower round number | lower round number − shift | higher round number + shift |
Parameters
| Parameter | Type | Default | Range | Purpose |
|---|---|---|---|---|
| Vertical shift | number | 0 | −2000 to 2000 | Points added above the higher level and subtracted below the lower one |
| Digits | number | 2 | 2 to 4 | Digits cut from the price: 2 brackets on steps of 100 points, 4 on steps of one point |
Calculation
- the bar's open is rounded to
Digitsdigits (Math.Round(open, symbol digits − Digits)); - if the rounded value is below the open, the higher level is
rounded + stepand the lower onerounded; if it is at or above the open (a tie rounds up), the higher level isroundedand the lower onerounded − step, withstep = point * 10^Digits; - the vertical shift widens the pair away from the market.
Both round numbers are drawn on the main price chart as level lines.
Backtesting
- The levels are derived from the bar open, which is known the moment the bar starts, so no read shift and no gap protection are needed: the level is always within one step of the market.
- The long and short levels differ, so both orders can be placed and the intrabar interpolation decides which side fills first.
- The indicator never contributes a rule signal, so it cannot be an entry or exit rule.