Most spread tools show the spread of the moment. The question a trader really asks is different: when is it cheap and liquid to trade this symbol on my broker, and is right now a good or a bad time? The answer depends on the broker, the symbol and the time of day, and it is already stored in your chart history: every bar carries a spread value, a tick volume and a price range. This indicator groups those values by time of day and shows what is normal for each slot.
For every time slot of the day (30 minutes by default, in server time) it keeps three medians:
The slots are then ranked against each other. The cheapest quarter of the slots is called cheap and the most expensive quarter is called expensive (the share is set by InpCutoffPercent ). A slot with the same typical spread as all the others, for example on a fixed-spread account, is never called cheap or expensive.
The profile is built without looking ahead. Each bar is judged against the profile of the bars that came before it, and a bar is added to the profile only once it is closed. The forming bar is therefore ranked against its slot, but it never counts itself. A slot with fewer than InpMinSamples bars stays empty until it has enough history. The calculation is incremental: on every call only the new bars and the bar that was still forming are processed, and the profile is stored in small fixed-size histograms, so history is never rescanned and nothing is sorted.
Two details of the numbers. Values from 0 to 127 are counted exactly. Larger values, such as the range of a bar in points, are grouped in bins about 4% wide, so those medians can be off by up to about 4%. A spread of 0 in the history means that the broker did not store one. Such a bar is left out of the spread statistics and is counted in the share of bars with a usable spread shown in the panel.

Fig. 1. Two days of M30 bars. The histogram shows the typical spread of each 30-minute slot (dark gray cheap, light gray normal, white expensive), the dotted line is the spread recorded in each bar, the white dots mark the rollover window, and the dotted horizontal line is the median spread of the whole day. The panel lists the cheapest and the most expensive slots and ranks the newest bar against its slot. Black and white screenshot, per the Code Base image guidelines.
| Input | Default | Purpose |
|---|---|---|
| InpSlotMinutes | 30 | Length of a time slot in minutes (5-240). It is raised to the length of the chart bar, never below 5, and moved up to the next value that divides the day evenly (so 50 becomes 60). |
| InpWeekdaySplit | false | Keep a separate profile for each weekday (up to 7). Every slot then has about a fifth of the samples, so more history is needed. |
| InpMinSamples | 20 | Bars a slot needs before its values are used (5-500). With the weekday split a slot gets one bar per week, so 20 means about 20 weeks. |
| InpHistoryBars | 20000 | Newest bars used when the indicator loads or is fully recalculated. 0 uses all bars. New bars are added as they arrive. |
| InpCutoffPercent | 25 | Share of slots called cheap and share called expensive (5-45). 25 means the cheapest quarter and the most expensive quarter of the slots. |
| InpRolloverHour | 0 | Server hour at which the daily rollover window starts (0-23). -1 switches the marker off. |
| InpRolloverMinutes | 60 | Length of the rollover window in minutes (1-720). |
| InpShowPanel | true | Show the statistics panel. |
| InpCheapColor | clrDimGray | Histogram color of cheap slots. |
| InpNormalColor | clrDarkGray | Histogram color of normal slots. |
| InpExpensiveColor | clrWhite | Histogram color of expensive slots. |
| InpActualColor | clrSilver | Color of the dotted line with the spread of each bar. |
| InpTextColor | clrSilver | Panel text color. |
| InpFontSize | 8 | Panel font size (Consolas). The line height follows the size. |
| InpPanelX , InpPanelY | 8, 14 | Panel offset from the upper left corner of the chart, in pixels. |
Noise Band Momentum - intraday Nasdaq breakout of the noise area (Zarattini 2024 rules)
Intraday momentum EA for the Nasdaq 100: trades breakouts of a noise band around the New York open (rules of Zarattini, Aziz and Barbon, 2024), exits inside the band or across the session VWAP, flat at 16:00 New York.
Session Boxes with DST-correct clocks
Tokyo, London and New York session boxes with high-low range, kept on the right hours through every clock change, plus a live clock panel.
Accelerator Oscillator (AC)
The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.
MACD Signals
Indicator edition for new platform.