PROTECTED SOURCE SCRIPT
B/S-signal

🧠 Main idea:
The indicator tries to determine in which direction the price is currently moving - up (bullish trend) or down (bearish trend). And when it is sure, it gives a signal:
🟢 "Buy!" (Buy)
🔴 "Sell!" (Sell)
🔍 How does the indicator work?
1. ATR Trailing Stop (dynamic support/resistance):
ATR (Average True Range) is a volatility indicator. It tells how much the price has moved over the last candles (default is 10).
The indicator uses ATR to calculate a stop level that "follows" the price.
This level is constantly updated and moves up or down, following the price - that's why it is called Trailing Stop .
📌 For example: if the price rises, the stop is also pulled up, but does not go lower. If the price falls - the stop is pulled down, but does not go higher.
2. Trend detection:
Compare the current closing price with the value of this dynamic stop.
If the price is above the stop → we consider it a bullish trend (maybe time to buy).
If the price is below the stop → we consider it a bearish trend (maybe time to sell).
3. Signal confirmation via EMA:
To avoid false signals, the indicator uses EMA (exponential moving average) with a period of 1 (very sensitive).
When EMA crosses our stop level from below → this confirms a buy signal.
When EMA crosses the stop level from above → this confirms a sell signal.
4. Buy / Sell signals:
Buy: the price is above the stop AND EMA crosses the stop from below.
Sell: the price is below the stop AND EMA crosses the stop from above.
5. Display on the chart:
Arrows appear on the chart:
🟢 Up — buy signal.
🔴 Down — sell signal.
Alerts (notifications) can also be created when these signals appear.
⚙️ Parameters that can be changed:
Multiplier (a): regulates the strength of the stop indent from the price. The higher the value, the further the stop is from the price.
Period (c): affects the ATR calculation. The higher the value, the smoother the stop.
📌 Example of behavior:
The price has been growing for a long time → the stop has been pulled up.
The price has started to fall → as soon as it crosses the stop from the bottom up and the EMA also crosses it → a Sell signal appears.
This means that a new bearish trend may have begun — it is worth thinking about selling.
🧩 Who can benefit from this indicator?
For traders who trade on the trend.
For those who want to receive Buy/Sell signals automatically.
Useful as part of a trading system, especially with filtering by volumes or other indicators.
--------------------------------------------------------------------------------------------------------------
🧠 Основная идея:
Индикатор пытается определить, в каком направлении сейчас движется цена — вверх (бычий тренд) или вниз (медвежий тренд) . И когда он уверен, даёт сигнал:
🟢 "Купи!" (Buy)
🔴 "Продай!" (Sell)
🔍 Как работает индикатор?
1. ATR Trailing Stop (динамическая поддержка/сопротивление):
ATR (Average True Range) — это показатель волатильности. Он говорит, насколько сильно цена двигалась за последние c свечей (по умолчанию 10).
Индикатор использует ATR, чтобы рассчитать стоп-уровень , который «следит» за ценой.
Этот уровень постоянно обновляется и сдвигается вверх или вниз, следуя за ценой — потому он и называется Trailing Stop .
📌 Например: если цена растёт, стоп тоже подтягивается вверх, но не опускается ниже. Если цена падает — стоп подтягивается вниз, но не поднимается выше.
2. Определение тренда:
Сравниваем текущую цену закрытия со значением этого динамического стопа.
Если цена выше стопа → считаем, что сейчас бычий тренд (возможно, пора покупать).
Если цена ниже стопа → считаем, что сейчас медвежий тренд (возможно, пора продавать).
3. Подтверждение сигнала через EMA:
Чтобы избежать ложных сигналов, индикатор использует EMA (экспоненциальное скользящее среднее) с периодом 1 (очень чувствительное).
Когда EMA пересекает наш стоп-уровень снизу вверх → это подтверждает сигнал на покупку.
Когда EMA пересекает стоп-уровень сверху вниз → это подтверждает сигнал на продажу.
4. Сигналы Buy / Sell:
Покупка (Buy) : цена выше стопа И EMA пересекает стоп снизу вверх.
Продажа (Sell) : цена ниже стопа И EMA пересекает стоп сверху вниз.
5. Отображение на графике:
На графике появляются стрелочки:
🟢 Вверх — сигнал на покупку.
🔴 Вниз — сигнал на продажу.
Также можно создать алерты (уведомления) при появлении этих сигналов.
⚙️ Параметры, которые можно менять:
Множитель (a) : регулирует силу отступа стопа от цены. Чем больше значение — тем дальше стоп от цены.
Период (c) : влияет на расчёт ATR. Чем больше — тем более "плавный" стоп.
📌 Пример поведения:
Цена долго росла → стоп подтянулся вверх.
Цена начала падать → как только она пересекает стоп снизу вверх и EMA тоже его пересекает → появляется сигнал Sell .
Значит, возможно, начался новый медвежий тренд — стоит задуматься о продаже.
🧩 Для кого полезен этот индикатор?
Трейдерам, которые торгуют по тренду .
Тем, кто хочет автоматически получать сигналы Buy/Sell .
Полезен как часть торговой системы, особенно с фильтрацией по объёмам или другим индикаторам.
The indicator tries to determine in which direction the price is currently moving - up (bullish trend) or down (bearish trend). And when it is sure, it gives a signal:
🟢 "Buy!" (Buy)
🔴 "Sell!" (Sell)
🔍 How does the indicator work?
1. ATR Trailing Stop (dynamic support/resistance):
ATR (Average True Range) is a volatility indicator. It tells how much the price has moved over the last candles (default is 10).
The indicator uses ATR to calculate a stop level that "follows" the price.
This level is constantly updated and moves up or down, following the price - that's why it is called Trailing Stop .
📌 For example: if the price rises, the stop is also pulled up, but does not go lower. If the price falls - the stop is pulled down, but does not go higher.
2. Trend detection:
Compare the current closing price with the value of this dynamic stop.
If the price is above the stop → we consider it a bullish trend (maybe time to buy).
If the price is below the stop → we consider it a bearish trend (maybe time to sell).
3. Signal confirmation via EMA:
To avoid false signals, the indicator uses EMA (exponential moving average) with a period of 1 (very sensitive).
When EMA crosses our stop level from below → this confirms a buy signal.
When EMA crosses the stop level from above → this confirms a sell signal.
4. Buy / Sell signals:
Buy: the price is above the stop AND EMA crosses the stop from below.
Sell: the price is below the stop AND EMA crosses the stop from above.
5. Display on the chart:
Arrows appear on the chart:
🟢 Up — buy signal.
🔴 Down — sell signal.
Alerts (notifications) can also be created when these signals appear.
⚙️ Parameters that can be changed:
Multiplier (a): regulates the strength of the stop indent from the price. The higher the value, the further the stop is from the price.
Period (c): affects the ATR calculation. The higher the value, the smoother the stop.
📌 Example of behavior:
The price has been growing for a long time → the stop has been pulled up.
The price has started to fall → as soon as it crosses the stop from the bottom up and the EMA also crosses it → a Sell signal appears.
This means that a new bearish trend may have begun — it is worth thinking about selling.
🧩 Who can benefit from this indicator?
For traders who trade on the trend.
For those who want to receive Buy/Sell signals automatically.
Useful as part of a trading system, especially with filtering by volumes or other indicators.
--------------------------------------------------------------------------------------------------------------
🧠 Основная идея:
Индикатор пытается определить, в каком направлении сейчас движется цена — вверх (бычий тренд) или вниз (медвежий тренд) . И когда он уверен, даёт сигнал:
🟢 "Купи!" (Buy)
🔴 "Продай!" (Sell)
🔍 Как работает индикатор?
1. ATR Trailing Stop (динамическая поддержка/сопротивление):
ATR (Average True Range) — это показатель волатильности. Он говорит, насколько сильно цена двигалась за последние c свечей (по умолчанию 10).
Индикатор использует ATR, чтобы рассчитать стоп-уровень , который «следит» за ценой.
Этот уровень постоянно обновляется и сдвигается вверх или вниз, следуя за ценой — потому он и называется Trailing Stop .
📌 Например: если цена растёт, стоп тоже подтягивается вверх, но не опускается ниже. Если цена падает — стоп подтягивается вниз, но не поднимается выше.
2. Определение тренда:
Сравниваем текущую цену закрытия со значением этого динамического стопа.
Если цена выше стопа → считаем, что сейчас бычий тренд (возможно, пора покупать).
Если цена ниже стопа → считаем, что сейчас медвежий тренд (возможно, пора продавать).
3. Подтверждение сигнала через EMA:
Чтобы избежать ложных сигналов, индикатор использует EMA (экспоненциальное скользящее среднее) с периодом 1 (очень чувствительное).
Когда EMA пересекает наш стоп-уровень снизу вверх → это подтверждает сигнал на покупку.
Когда EMA пересекает стоп-уровень сверху вниз → это подтверждает сигнал на продажу.
4. Сигналы Buy / Sell:
Покупка (Buy) : цена выше стопа И EMA пересекает стоп снизу вверх.
Продажа (Sell) : цена ниже стопа И EMA пересекает стоп сверху вниз.
5. Отображение на графике:
На графике появляются стрелочки:
🟢 Вверх — сигнал на покупку.
🔴 Вниз — сигнал на продажу.
Также можно создать алерты (уведомления) при появлении этих сигналов.
⚙️ Параметры, которые можно менять:
Множитель (a) : регулирует силу отступа стопа от цены. Чем больше значение — тем дальше стоп от цены.
Период (c) : влияет на расчёт ATR. Чем больше — тем более "плавный" стоп.
📌 Пример поведения:
Цена долго росла → стоп подтянулся вверх.
Цена начала падать → как только она пересекает стоп снизу вверх и EMA тоже его пересекает → появляется сигнал Sell .
Значит, возможно, начался новый медвежий тренд — стоит задуматься о продаже.
🧩 Для кого полезен этот индикатор?
Трейдерам, которые торгуют по тренду .
Тем, кто хочет автоматически получать сигналы Buy/Sell .
Полезен как часть торговой системы, особенно с фильтрацией по объёмам или другим индикаторам.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.