Almazov Trade: SMT Monitor

5 325
Almazov Trade: SMT Monitor

An open-source multi-symbol swing-level monitor. It tracks confirmed swing highs and lows, identifies when price moves strictly beyond those levels, and compares the current states and percentage distances of selected instruments in one table. The chart also displays the current symbol's active and most recently swept swing levels.

Customizable table size and coin list

You can change the table size and add coins directly in the indicator settings.

  • Table → Text size: select Tiny, Small, Normal or Large (default: Normal). Font size is selected separately; table row heights adapt to the chart pane. Table → Language switches RU/EN (default: EN).
  • Coins: main / Coins: extra: enable or disable any of 16 preset coins or replace their TradingView tickers. Fourteen presets are initially enabled; AAVE and FLOKI are off.
  • Свои инструменты / Custom symbols: add up to 10 symbols: choose a ticker and tick the checkbox next to that slot's number (1–10), then apply the settings. Selecting a ticker alone does not enable its row (e.g., select BYBIT:UNIUSDT.P in slot 1 and tick “1”). The chart symbol is added automatically and duplicate base assets are omitted from comparison rows.


Despite its name, the script does not automatically detect classical Smart Money Technique (SMT) divergence: it does not pair extrema across instruments by time or issue cross-market divergence signals. Instead, it provides structured information for manual comparison.

Symbols and data

The current chart symbol is always included. There are 16 presets: BTC, ETH, SOL, XRP, BNB, DOGE, SUI, HYPE, LINK, PEPE, ADA, AAVE, NEAR, AVAX, TRUMP and FLOKI. Fourteen are enabled by default; AAVE, FLOKI and all ten custom slots are disabled. Presets now use USDT perpetual futures from Binance, except HYPE (Bybit); each ticker can be changed. PEPE and FLOKI use 1000-token contracts (BINANCE:1000PEPEUSDT.P and BINANCE:1000FLOKIUSDT.P), displayed as PEPE and FLOKI. This choice affects defaults only: spot and other markets can be selected manually. The chart instrument is taken directly from the open chart, so open a futures chart to compare futures consistently. Previously saved indicator settings may retain spot tickers; change them manually or reset to the new defaults. A blank custom-symbol field resolves to the chart symbol; it does not select a new asset.

Enabled comparisons use request.security() on the chart's timeframe, with lookahead=barmerge.lookahead_off, gaps=barmerge.gaps_off, and invalid-symbol handling. Swing calculations are independent for each symbol. No higher-timeframe confirmation or correlation filter is used. The table excludes duplicate base assets (including the chart symbol), keeping the first eligible entry in settings order; XBT is treated as BTC, 1000PEPE as PEPE and 1000FLOKI as FLOKI. Duplicate slots may still use data requests.

Confirmed swings and swept levels

A Swing High is the highest High, and a Swing Low the lowest Low, in a configurable window of 2 × d + 1 candles. High and Low use independent widths, default d = 2 (range 1–60). Equal neighboring extremes are permitted. A pivot becomes available only after the required right-side candles have closed; the implementation registers it on the following bar and anchors its line to the original pivot candle.

For each instrument, two monotonic stacks retain unswept highs and lows. A newly confirmed High replaces earlier stack entries at or below its price; a new Low replaces entries at or above its price. The stack's last element is the nearest retained level in that direction. Replacement by a newer pivot is not treated as a sweep.

A High is swept when the current bar's High is strictly above the level; a Low is swept when its Low is strictly below the level. Equality does not qualify. Neither a closing-price break nor a return into the previous range is required. One candle can sweep several levels or both sides. In each direction, the script remembers the most extreme level swept on that bar.

The last swept High/Low remains recorded until a newly confirmed swing on the same side resets it or another sweep on that side replaces it. Thus, a check mark in the table can refer to a previous bar, not necessarily the current one.

Table: states and distances

The table is vertically centered on the right and occupies approximately 86% of the chart pane height, leaving about 7% above and below. Row heights adapt to the chart size and number of displayed symbols; headings, separators and the explanatory block use separate proportions. Font size is selected independently (Tiny, Small, Normal or Large), without automatic reduction, so many rows may crowd a small chart. The upper Swing High and lower Swing Low sections are separated visually. The chart symbol is pinned first and highlighted in both; other symbols are ranked independently for each side.

  • ○ — an unswept level is available; the main Δ shows the unsigned distance to that level.
  • ✓ — a swept level is retained; Δ shows the signed position of price relative to that swept level.
  • — — current data are available but neither relevant level is available.
  • ! — data are unavailable or not aligned with the chart's current bar.


The percentages are based on each symbol's own current close:

Pine Script®


In ✓ mode, a positive Δ means price is above the swept level and a negative Δ means below it; this sign is not a buy/sell direction. The Next Swing column appears only when a swept level is recorded and another unswept level remains. Values are displayed to two decimals. Hover tooltips show price, level and calculation context.

Ranking is context-dependent. If the chart symbol has a retained sweep on that side, instruments with retained sweeps are listed before unswept instruments; ranking then prioritizes distances to active remaining swing levels. Otherwise, unswept instruments appear first and are ranked by distance to the nearest active level; swept instruments follow, ranked by absolute distance to their swept levels. Unavailable data appear last, and ties preserve the original input order. Sorting uses unrounded values.

Chart levels and alerts

Only the current chart symbol receives lines. The nearest unswept Swing High (red by default) and Swing Low (green) use solid lines. The last retained swept levels use lighter dashed lines and labels marked “снят” / “taken”. Lines extend right from the original pivot timestamps. At most four levels are shown; older levels are updated or replaced rather than archived.

Three alerts are provided for the chart symbol only: Swing High taken, Swing Low taken, and Any swing taken. Comparisons in the table do not have their own alert conditions. A sweep can be detected during a developing candle; alerts are not inherently restricted to candle close. Choose the TradingView alert frequency according to the desired behavior.

Limitations and implementation

Use standard time-based charts; synthetic and tick-based charts are rejected. Data are considered current only when the remote symbol's bar-open time matches the current chart bar and a positive close is available. This does not guarantee synchronized quote updates within the bar. Prices, sweep states, percentages and row rankings can change before the current candle closes.

The comparison list is not synchronized by historical pivot or sweep time. Two ✓ statuses may refer to events on different candles. Some instruments or exchanges may have unavailable, missing or differently timed bars. Request, memory and execution limits of Pine Script also apply; the swing stacks have an explicit collection-size guard. Historical results depend on available chart data and settings.

This is an informational comparison tool, not an automatic SMT-divergence detector, trade-entry system, backtest or promise of predictive performance. No entries, stops, take-profits, broker orders or cross-symbol divergence alerts are generated.


Implementation and settings

Confirmed swings and price-level sweeps are established concepts. This implementation combines independent monotonic level stacks for multiple symbols, persistent swept-level states, dynamically sorted distance tables, freshness checks, and a small set of continuously updated chart levels for the current instrument.

The interface supports RU/EN table text (default: EN) and four table-font sizes (Tiny, Small, Normal, Large; default: Normal). Default swing widths are 2 bars on each side. Swing High is red and Swing Low green by default. Input values are hidden from the chart status line.

Russian interface translations

  • «Swing high: баров слева и справа» / «Swing low: баров слева и справа» — Swing High / Swing Low: bars on each side.
  • «Язык» — Language (default EN); «Размер текста» — Text size (default Normal); «Свои инструменты» — Custom symbols; «Тикер» — Symbol. A custom symbol must also be enabled with the checkbox for its numbered slot.
  • «Монета» — Coin; «След. свинг» — Next Swing; «снят» — taken / swept; «Цена» — Price. Contract names 1000PEPE and 1000FLOKI are shown as PEPE and FLOKI.
  • «○ До следующего свинга» — ○ To next swing; «✓ От уровня снятия» — ✓ From swept level.
  • «Нет доступного уровня или актуальных данных» — No available level or current data.
  • «Положение цены относительно снятого: + выше, − ниже» — Position relative to swept level: positive above, negative below.
  • «Расстояние до ближайшего неснятого свинга» — Distance to the nearest unswept swing; «Расстояние до следующего неснятого свинга в стеке» — Distance to the next unswept swing in the stack.
  • «Используйте обычный временной график» — Use a standard time-based chart; «Стек превысил лимит коллекции Pine» — Swing stack exceeds Pine collection limit.


РУССКАЯ ВЕРСИЯ

Almazov Trade: SMT Monitor

Индикатор с открытым кодом для сравнения состояния структурных Swing High и Swing Low на нескольких инструментах. Он показывает ближайшие неснятые уровни, фиксирует снятие свингов и рассчитывает процентные расстояния в таблице. На самом графике рисуются уровни только текущего инструмента.

Размер таблицы и добавление монет

В настройках индикатора можно менять размер таблицы и самостоятельно добавлять монеты для сравнения.

  • Table → «Размер текста / Text size»: четыре варианта: Tiny, Small, Normal и Large (по умолчанию Normal). Высота строк автоматически подстраивается под график, а размер шрифта выбирается отдельно. «Язык / Language» переключает RU/EN (по умолчанию EN).
  • Coins: main / Coins: extra: 16 готовых монет; 14 включены по умолчанию, AAVE и FLOKI выключены. Можно менять галочки и тикеры.
  • «Свои инструменты / Custom symbols»: 10 дополнительных слотов. Выберите тикер, затем обязательно поставьте галочку слева от номера слота (1–10) и примените настройки. Сам выбор тикера строку не добавляет (например, для UNI выберите BYBIT:UNIUSDT.P в слоте 1 и включите галочку «1»). Текущий инструмент включён автоматически; повторы одной базовой монеты скрываются.


Важно: индикатор не определяет классическую SMT-дивергенцию автоматически. Он не сопоставляет экстремумы разных монет по времени и не выдаёт сигналы расхождения. Монитор предоставляет данные для самостоятельного сравнения.

Монеты и таймфрейм

Доступны 16 предустановленных монет (BTC, ETH, SOL, XRP, BNB, DOGE, SUI, HYPE, LINK, PEPE, ADA, AAVE, NEAR, AVAX, TRUMP, FLOKI) и 10 дополнительных слотов. По умолчанию включены все, кроме AAVE и FLOKI. Предустановленные тикеры теперь — бессрочные USDT-фьючерсы Binance; для HYPE — Bybit. PEPE и FLOKI используют контракты 1000PEPEUSDT.P и 1000FLOKIUSDT.P, но в таблице подписываются PEPE и FLOKI. Выбор спота вручную не запрещён. Текущий инструмент берётся с открытого графика, поэтому для сравнения фьючерсов откройте фьючерсный график. В старых сохранённых настройках могут остаться спотовые тикеры — измените их вручную или сбросьте настройки индикатора. Пустое поле пользовательского тикера означает инструмент графика, а не новую монету.

Текущий инструмент всегда присутствует в таблице. Остальные загружаются через request.security() на таймфрейме графика и обрабатываются независимо. Повторы одной базовой монеты исключаются, остаётся первый по порядку настроек. В проверке дублей XBT приравнивается к BTC, 1000PEPE — к PEPE, а 1000FLOKI — к FLOKI.

Свинг и снятие уровня

Swing High/Low — экстремум окна из 2 × d + 1 свечей. Для максимума и минимума ширина настраивается отдельно: от 1 до 60 свечей с каждой стороны, по умолчанию 2. Свинг подтверждается только после формирования правой части окна; линия привязана к исходной свече экстремума.

Для каждого инструмента поддерживаются стеки ещё не снятых High и Low. Ближайший уровень — последний элемент соответствующего стека. Новый подтверждённый свинг может заменить более слабые или равные уровни, не формируя события снятия.

  • High считается снятым, когда High свечи строго выше уровня.
  • Low считается снятым, когда Low свечи строго ниже уровня.
  • Точное касание не считается снятием. Закрытие за уровнем и возврат обратно не требуются.
  • При снятии нескольких уровней сохраняется крайний. Снятый уровень остаётся в памяти до нового подтверждённого свинга той же стороны либо следующего снятия этой стороны.


Таблица и расчёт процентов

Таблица расположена справа по центру и занимает примерно 86% высоты графика, оставляя около 7% сверху и снизу. Высота строк подстраивается под окно и количество монет; заголовки, разделители и пояснения имеют отдельные пропорции. Шрифт регулируется независимо (Tiny, Small, Normal, Large), без автоматического уменьшения, поэтому на маленьком графике при большом числе строк текст может не помещаться. Верхняя секция — Swing High, нижняя — Swing Low. Текущий инструмент закреплён первой строкой; остальные монеты сортируются независимо в обеих секциях.

  • ○ — доступен неснятый свинг; Δ показывает расстояние до него: 100 × |уровень − close| / close.
  • ✓ — сохранён снятый свинг; Δ показывает 100 × (close − снятый уровень) / close. Плюс означает цену выше уровня, минус — ниже.
  • «След. свинг» — расстояние до следующего неснятого уровня, если после снятия он существует.
  • — — доступных уровней нет; ! — данные отсутствуют или не совпадают по времени бара.


Значения нормируются на Close соответствующей монеты, выводятся с двумя знаками после запятой. Знак Δ не является торговым сигналом. Если на графике сохранено снятие нужной стороны, приоритет в сортировке получают монеты со снятыми уровнями; иначе — без снятия. Затем учитываются расстояния до активных или снятых уровней. Неактуальные строки опускаются вниз.

Уровни и уведомления

На основном графике сплошными линиями показаны ближайшие неснятые Swing High (красный) и Swing Low (зелёный). Пунктиром — последние сохранённые снятые уровни с подписью «снят». Линии начинаются от свечей экстремумов и продолжаются вправо. Старые линии заменяются, отдельный архив не ведётся.

Доступны три алерта только для текущего инструмента: снятие Swing High, снятие Swing Low и снятие любого из них. Они могут срабатывать при формировании текущей свечи; частота определяется настройкой уведомления. Снятия других монет не создают отдельных алертов.

Ограничения и особенности

Используйте обычные временные графики. Данные внешней монеты считаются актуальными, если время открытия её свечи совпадает с текущей свечой графика и доступна цена Close. Это не гарантирует синхронного обновления котировок внутри свечи. Таблица и состояния могут меняться в реальном времени.

Снятия у разных монет не сопоставляются по времени: две галочки ✓ могут относиться к разным историческим событиям. Пропуски котировок, ограничения запросов TradingView и доступная история влияют на результаты. Индикатор не открывает сделки и не рассчитывает SL/TP.

Это аналитический монитор, а не автоматический детектор SMT-дивергенций или торговая стратегия. Отображаемые уровни и расстояния не гарантируют будущего движения цены.


Настройки

Группы Swings, Table, Chart, Coins: main, Coins: extra и «Свои инструменты / Custom symbols» позволяют изменить ширину свингов, язык таблицы (EN по умолчанию), размер (Normal по умолчанию), цвета уровней и список монет. Чтобы добавить монету, недостаточно выбрать тикер: нужно включить галочку соответствующего слота. Значения параметров скрыты из строки статуса. Переводы русских подписей, подсказок и сообщений об ошибках приведены выше.

Отказ от ответственности

Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.