OPEN-SOURCE SCRIPT
Bystry BOS CHoCH FVG + RSI Candles

Bystry BOS CHoCH FVG + RSI Candles
Bystry BOS CHoCH FVG + RSI Candles is a visual market structure indicator designed to combine BOS, CHoCH, unmitigated Fair Value Gaps and RSI-based candle coloring directly on the price chart.
The purpose of this indicator is to help traders read market structure, identify potential imbalance zones and visually evaluate momentum or trend strength through candle colors.
This script is an analytical overlay tool. It does not execute trades, does not provide guaranteed buy or sell signals and should not be used as a standalone trading system. All decisions should be confirmed with the trader’s own analysis, testing and risk management.
Main features
The indicator includes four main modules:
1. BOS and CHoCH market structure
2. Unmitigated Fair Value Gaps
3. RSI-based candle coloring
4. Alert conditions for structure and FVG events
The script is designed to keep the chart readable while showing important price-action context directly on the candles.
1. BOS and CHoCH market structure
The first module detects and displays basic market structure events:
BOS — Break of Structure
CHoCH — Change of Character
The indicator identifies swing highs and swing lows using a configurable pivot length called “Swing Strength”.
When price breaks above the latest detected swing high, the script marks a bullish structure break.
When price breaks below the latest detected swing low, the script marks a bearish structure break.
The indicator then classifies the break as either BOS or CHoCH depending on the previous structure direction.
If the previous structure was bearish and price breaks a swing high, the event is marked as bullish CHoCH.
If the previous structure was already bullish and price breaks another swing high, the event is marked as bullish BOS.
If the previous structure was bullish and price breaks a swing low, the event is marked as bearish CHoCH.
If the previous structure was already bearish and price breaks another swing low, the event is marked as bearish BOS.
This allows the trader to visually distinguish between continuation structure and potential structure shift.
2. Swing Strength
The “Swing Strength” setting controls how sensitive the structure detection is.
Lower values create more swing points and more BOS/CHoCH markings. This makes the indicator more reactive, but it can also create more noise.
Higher values create fewer swing points and fewer structure events. This makes the chart cleaner, but signals may appear later.
This setting should be adjusted depending on the market, timeframe and trading style.
For scalping or lower timeframes, a lower value may show more detail.
For cleaner structure reading or higher timeframes, a higher value may be more useful.
3. Break confirmation mode
The indicator includes two break confirmation modes:
Close
Wick
Close mode means that price must close beyond the swing level to confirm a BOS or CHoCH.
Wick mode means that it is enough for the candle wick to break the swing level.
Close mode is more conservative and can reduce false breaks.
Wick mode is more sensitive and can show structure breaks earlier, but it may also react to liquidity sweeps or temporary price spikes.
The best setting depends on how the trader defines a valid structure break.
4. Confirmation after candle close
The script includes an option called “Do not draw before candle close”.
When this option is enabled, the indicator waits for the candle to close before drawing BOS or CHoCH events.
This is useful for reducing real-time repainting behavior and avoiding markings that appear during an unfinished candle and disappear before close.
When disabled, the indicator can react faster during the live candle, but markings may be less stable before the candle is confirmed.
5. BOS and CHoCH visualization
When a structure event is detected, the indicator draws a horizontal line from the broken swing point to the candle that caused the break.
A small BOS or CHoCH label is placed near the middle of the line.
Bullish structure events use the bullish structure color.
Bearish structure events use the bearish structure color.
The user can customize:
BOS visibility,
CHoCH visibility,
swing strength,
break confirmation mode,
candle close confirmation,
number of recent structure events to keep,
line style,
bullish color,
bearish color.
The structure line style can be set to:
Solid,
Dotted,
Dashed.
6. Structure history limit
The indicator allows the user to control how many recent BOS and CHoCH events remain visible on the chart.
This helps keep the chart clean and prevents unnecessary object overload.
Once the selected limit is exceeded, the oldest structure lines and labels are automatically removed.
This is useful because TradingView scripts have limits for lines, labels and boxes.
7. Fair Value Gap module
The second module detects and displays Fair Value Gaps.
A bullish FVG is detected when the current candle’s low is above the high from two candles earlier.
A bearish FVG is detected when the current candle’s high is below the low from two candles earlier.
The script draws the FVG as a box directly on the price chart.
Bullish FVG zones use the bullish FVG color.
Bearish FVG zones use the bearish FVG color.
The indicator is designed to display only active, unmitigated FVG zones. Once the selected mitigation condition is met, the FVG box is removed from the chart.
8. Unmitigated FVG logic
This indicator does not keep old mitigated FVG zones visible by default.
The purpose is to reduce chart clutter and show only zones that have not yet been revisited according to the chosen mitigation method.
This makes the FVG module more focused on currently active imbalance areas rather than historical zones that price has already filled or touched.
9. FVG confirmation after candle close
The FVG module includes a separate candle-close confirmation setting.
When enabled, a new FVG is drawn only after the candle closes.
When disabled, the FVG can appear during the live candle, but it may change or disappear before the candle closes.
For cleaner analysis, candle-close confirmation is usually more conservative.
10. Minimum FVG size
The indicator includes a minimum FVG size filter measured in ticks.
If the detected FVG is smaller than the selected minimum size, it will not be drawn.
This helps filter out very small gaps that may not be meaningful on a given market or timeframe.
A value of 0 allows all valid FVGs to be shown.
Higher values show only larger imbalance zones.
11. FVG box width
The “Extra box width to the right” setting controls how far the FVG box extends beyond the classic three-candle formation.
A value of 0 means the box covers only the original FVG formation area.
Higher values extend the box further to the right.
This can make zones easier to see and review on the chart.
12. Extend active FVG
The indicator includes an option to extend active FVG zones.
When enabled, unmitigated FVG boxes continue extending to the right as new bars appear.
When disabled, the box remains in its original area plus any selected extra width.
This gives the user two different visual styles:
static FVG boxes,
or active extended FVG zones.
13. FVG mitigation modes
The script allows the user to choose how an FVG should be considered mitigated.
There are three available modes:
Touch
50%
Full Fill
Touch mode removes the FVG when price first enters the zone.
For a bullish FVG, this happens when price moves down into the top of the gap.
For a bearish FVG, this happens when price moves up into the bottom of the gap.
50% mode removes the FVG when price reaches the midpoint of the zone.
Full Fill mode removes the FVG only when price fully fills the entire gap.
These modes allow traders to match the indicator to their own FVG interpretation.
Touch is the most sensitive.
50% is a balanced approach.
Full Fill is the most conservative.
14. Maximum active FVG zones
The indicator allows the user to define how many active FVG zones should be kept on the chart.
When the limit is exceeded, the oldest active FVG boxes are removed.
This helps maintain chart readability and keeps the script within TradingView object limits.
15. RSI Candle Coloring
The third module colors candles based on RSI calculations.
The purpose of this module is to show momentum, trend bias or potential mean-reversion conditions directly on the candles without requiring a separate RSI panel.
The RSI values are not plotted as an oscillator. Instead, the information is displayed visually through candle colors.
This keeps the chart cleaner and allows the trader to read RSI context directly from price candles.
16. Candle coloring modes
The indicator includes four candle coloring modes:
Off
Trend
Mean-Reversion
Trend Strength
Off disables RSI candle coloring.
Trend mode colors candles based on whether the smoothed fast RSI is above or below 50.
When RSI is above 50, candles use the bullish color.
When RSI is below 50, candles use the bearish color.
Mean-Reversion mode uses a gradient based on RSI values. It is designed to visually highlight areas where RSI may be closer to oversold or overbought conditions.
Trend Strength mode also uses a gradient, but the color logic is oriented toward trend strength. Stronger RSI values receive stronger trend-based coloring.
17. RSI source
The user can choose which price source is used for RSI calculation.
Available sources are:
Close,
Open,
High,
Low,
HL2,
HLC3,
OHLC4.
The default source is OHLC4.
Changing the source can affect the sensitivity and smoothness of the candle coloring.
18. RSI calculation type
The indicator supports three RSI calculation types:
Wilder / RMA
EMA
SMA / Cutler
Wilder / RMA is the classic RSI smoothing method.
EMA uses exponential smoothing and may react differently to recent price changes.
SMA / Cutler uses simple moving average smoothing.
This allows the trader to adapt the RSI behavior to their preferred style.
19. Fast RSI and Slow RSI
The indicator calculates two RSI lines internally:
Fast RSI
Slow RSI
The default Fast RSI period is 14.
The default Slow RSI period is 20.
Both RSI values are smoothed with an EMA smoothing setting.
The candle color is primarily based on the smoothed fast RSI, while the signal line can be calculated from Fast RSI, Slow RSI or the average of both.
20. Signal line logic
The script includes an internal signal line based on the selected RSI source:
Fast RSI,
Slow RSI,
or Average of Both.
The signal line is calculated using a simple moving average with a configurable length.
In the current version, the signal line is used internally as part of the RSI module setup, but it is not displayed as a separate oscillator panel.
21. RSI candle overlay
The script uses both native bar coloring and candle overlay plotting.
This means colored candles are displayed directly on the chart with matching body, wick and border colors.
The goal is to make RSI-based candle states visually clear without opening a separate RSI pane.
22. Alerts
The indicator includes alert conditions for key events:
Bullish BOS
Bearish BOS
Bullish CHoCH
Bearish CHoCH
Bullish FVG
Bearish FVG
These alerts can be used in TradingView’s alert system.
Alert messages include the ticker and timeframe.
Alerts are informational only. They do not guarantee that price will continue, reverse or react from a specific level.
23. Best use cases
This indicator can be useful for traders who want to:
read market structure directly on the chart,
identify BOS and CHoCH events,
focus only on unmitigated FVG zones,
reduce chart clutter from old mitigated gaps,
color candles using RSI-based logic,
combine price action structure with momentum context,
create alerts for structure breaks and new FVG zones.
It can be used for manual analysis, replay study, backtesting ideas visually and building a structured market view.
24. Suggested workflow
One possible way to use the indicator is:
First, observe the broader market structure using BOS and CHoCH.
Second, identify whether price is forming bullish or bearish imbalance zones through FVG.
Third, use the RSI candle coloring as additional momentum or trend-strength context.
Fourth, wait for your own confirmation before making any trading decision.
The indicator is designed to support analysis, not replace the trader’s decision-making process.
25. Important limitations
This indicator does not predict future price movement.
A BOS does not guarantee trend continuation.
A CHoCH does not guarantee a reversal.
An FVG does not guarantee that price will return to the zone or react from it.
RSI candle colors do not guarantee profitable entries.
Market structure, imbalance and momentum tools should be combined with risk management, market context and proper testing.
The behavior of the indicator may vary depending on:
market,
timeframe,
liquidity,
volatility,
session,
spread,
data provider,
chosen settings.
26. Repainting and confirmation notes
The indicator uses pivot-based swing detection for BOS and CHoCH.
Pivot points require future candles to confirm a swing high or swing low. Because of this, structure levels are identified only after the pivot is confirmed.
The script includes confirmation settings to reduce unstable real-time behavior.
Using candle-close confirmation can make signals more stable, but it may also make them appear later.
This is a normal trade-off between speed and reliability.
27. Educational disclaimer
This script is provided for educational and analytical purposes only.
It is not financial advice, investment advice or a recommendation to buy or sell any market.
Trading involves risk, and past chart behavior does not guarantee future results.
Each trader should test the indicator, understand its logic and use proper risk management before applying it in live market conditions.
Bystry BOS CHoCH FVG + RSI Candles is a visual market structure indicator designed to combine BOS, CHoCH, unmitigated Fair Value Gaps and RSI-based candle coloring directly on the price chart.
The purpose of this indicator is to help traders read market structure, identify potential imbalance zones and visually evaluate momentum or trend strength through candle colors.
This script is an analytical overlay tool. It does not execute trades, does not provide guaranteed buy or sell signals and should not be used as a standalone trading system. All decisions should be confirmed with the trader’s own analysis, testing and risk management.
Main features
The indicator includes four main modules:
1. BOS and CHoCH market structure
2. Unmitigated Fair Value Gaps
3. RSI-based candle coloring
4. Alert conditions for structure and FVG events
The script is designed to keep the chart readable while showing important price-action context directly on the candles.
1. BOS and CHoCH market structure
The first module detects and displays basic market structure events:
BOS — Break of Structure
CHoCH — Change of Character
The indicator identifies swing highs and swing lows using a configurable pivot length called “Swing Strength”.
When price breaks above the latest detected swing high, the script marks a bullish structure break.
When price breaks below the latest detected swing low, the script marks a bearish structure break.
The indicator then classifies the break as either BOS or CHoCH depending on the previous structure direction.
If the previous structure was bearish and price breaks a swing high, the event is marked as bullish CHoCH.
If the previous structure was already bullish and price breaks another swing high, the event is marked as bullish BOS.
If the previous structure was bullish and price breaks a swing low, the event is marked as bearish CHoCH.
If the previous structure was already bearish and price breaks another swing low, the event is marked as bearish BOS.
This allows the trader to visually distinguish between continuation structure and potential structure shift.
2. Swing Strength
The “Swing Strength” setting controls how sensitive the structure detection is.
Lower values create more swing points and more BOS/CHoCH markings. This makes the indicator more reactive, but it can also create more noise.
Higher values create fewer swing points and fewer structure events. This makes the chart cleaner, but signals may appear later.
This setting should be adjusted depending on the market, timeframe and trading style.
For scalping or lower timeframes, a lower value may show more detail.
For cleaner structure reading or higher timeframes, a higher value may be more useful.
3. Break confirmation mode
The indicator includes two break confirmation modes:
Close
Wick
Close mode means that price must close beyond the swing level to confirm a BOS or CHoCH.
Wick mode means that it is enough for the candle wick to break the swing level.
Close mode is more conservative and can reduce false breaks.
Wick mode is more sensitive and can show structure breaks earlier, but it may also react to liquidity sweeps or temporary price spikes.
The best setting depends on how the trader defines a valid structure break.
4. Confirmation after candle close
The script includes an option called “Do not draw before candle close”.
When this option is enabled, the indicator waits for the candle to close before drawing BOS or CHoCH events.
This is useful for reducing real-time repainting behavior and avoiding markings that appear during an unfinished candle and disappear before close.
When disabled, the indicator can react faster during the live candle, but markings may be less stable before the candle is confirmed.
5. BOS and CHoCH visualization
When a structure event is detected, the indicator draws a horizontal line from the broken swing point to the candle that caused the break.
A small BOS or CHoCH label is placed near the middle of the line.
Bullish structure events use the bullish structure color.
Bearish structure events use the bearish structure color.
The user can customize:
BOS visibility,
CHoCH visibility,
swing strength,
break confirmation mode,
candle close confirmation,
number of recent structure events to keep,
line style,
bullish color,
bearish color.
The structure line style can be set to:
Solid,
Dotted,
Dashed.
6. Structure history limit
The indicator allows the user to control how many recent BOS and CHoCH events remain visible on the chart.
This helps keep the chart clean and prevents unnecessary object overload.
Once the selected limit is exceeded, the oldest structure lines and labels are automatically removed.
This is useful because TradingView scripts have limits for lines, labels and boxes.
7. Fair Value Gap module
The second module detects and displays Fair Value Gaps.
A bullish FVG is detected when the current candle’s low is above the high from two candles earlier.
A bearish FVG is detected when the current candle’s high is below the low from two candles earlier.
The script draws the FVG as a box directly on the price chart.
Bullish FVG zones use the bullish FVG color.
Bearish FVG zones use the bearish FVG color.
The indicator is designed to display only active, unmitigated FVG zones. Once the selected mitigation condition is met, the FVG box is removed from the chart.
8. Unmitigated FVG logic
This indicator does not keep old mitigated FVG zones visible by default.
The purpose is to reduce chart clutter and show only zones that have not yet been revisited according to the chosen mitigation method.
This makes the FVG module more focused on currently active imbalance areas rather than historical zones that price has already filled or touched.
9. FVG confirmation after candle close
The FVG module includes a separate candle-close confirmation setting.
When enabled, a new FVG is drawn only after the candle closes.
When disabled, the FVG can appear during the live candle, but it may change or disappear before the candle closes.
For cleaner analysis, candle-close confirmation is usually more conservative.
10. Minimum FVG size
The indicator includes a minimum FVG size filter measured in ticks.
If the detected FVG is smaller than the selected minimum size, it will not be drawn.
This helps filter out very small gaps that may not be meaningful on a given market or timeframe.
A value of 0 allows all valid FVGs to be shown.
Higher values show only larger imbalance zones.
11. FVG box width
The “Extra box width to the right” setting controls how far the FVG box extends beyond the classic three-candle formation.
A value of 0 means the box covers only the original FVG formation area.
Higher values extend the box further to the right.
This can make zones easier to see and review on the chart.
12. Extend active FVG
The indicator includes an option to extend active FVG zones.
When enabled, unmitigated FVG boxes continue extending to the right as new bars appear.
When disabled, the box remains in its original area plus any selected extra width.
This gives the user two different visual styles:
static FVG boxes,
or active extended FVG zones.
13. FVG mitigation modes
The script allows the user to choose how an FVG should be considered mitigated.
There are three available modes:
Touch
50%
Full Fill
Touch mode removes the FVG when price first enters the zone.
For a bullish FVG, this happens when price moves down into the top of the gap.
For a bearish FVG, this happens when price moves up into the bottom of the gap.
50% mode removes the FVG when price reaches the midpoint of the zone.
Full Fill mode removes the FVG only when price fully fills the entire gap.
These modes allow traders to match the indicator to their own FVG interpretation.
Touch is the most sensitive.
50% is a balanced approach.
Full Fill is the most conservative.
14. Maximum active FVG zones
The indicator allows the user to define how many active FVG zones should be kept on the chart.
When the limit is exceeded, the oldest active FVG boxes are removed.
This helps maintain chart readability and keeps the script within TradingView object limits.
15. RSI Candle Coloring
The third module colors candles based on RSI calculations.
The purpose of this module is to show momentum, trend bias or potential mean-reversion conditions directly on the candles without requiring a separate RSI panel.
The RSI values are not plotted as an oscillator. Instead, the information is displayed visually through candle colors.
This keeps the chart cleaner and allows the trader to read RSI context directly from price candles.
16. Candle coloring modes
The indicator includes four candle coloring modes:
Off
Trend
Mean-Reversion
Trend Strength
Off disables RSI candle coloring.
Trend mode colors candles based on whether the smoothed fast RSI is above or below 50.
When RSI is above 50, candles use the bullish color.
When RSI is below 50, candles use the bearish color.
Mean-Reversion mode uses a gradient based on RSI values. It is designed to visually highlight areas where RSI may be closer to oversold or overbought conditions.
Trend Strength mode also uses a gradient, but the color logic is oriented toward trend strength. Stronger RSI values receive stronger trend-based coloring.
17. RSI source
The user can choose which price source is used for RSI calculation.
Available sources are:
Close,
Open,
High,
Low,
HL2,
HLC3,
OHLC4.
The default source is OHLC4.
Changing the source can affect the sensitivity and smoothness of the candle coloring.
18. RSI calculation type
The indicator supports three RSI calculation types:
Wilder / RMA
EMA
SMA / Cutler
Wilder / RMA is the classic RSI smoothing method.
EMA uses exponential smoothing and may react differently to recent price changes.
SMA / Cutler uses simple moving average smoothing.
This allows the trader to adapt the RSI behavior to their preferred style.
19. Fast RSI and Slow RSI
The indicator calculates two RSI lines internally:
Fast RSI
Slow RSI
The default Fast RSI period is 14.
The default Slow RSI period is 20.
Both RSI values are smoothed with an EMA smoothing setting.
The candle color is primarily based on the smoothed fast RSI, while the signal line can be calculated from Fast RSI, Slow RSI or the average of both.
20. Signal line logic
The script includes an internal signal line based on the selected RSI source:
Fast RSI,
Slow RSI,
or Average of Both.
The signal line is calculated using a simple moving average with a configurable length.
In the current version, the signal line is used internally as part of the RSI module setup, but it is not displayed as a separate oscillator panel.
21. RSI candle overlay
The script uses both native bar coloring and candle overlay plotting.
This means colored candles are displayed directly on the chart with matching body, wick and border colors.
The goal is to make RSI-based candle states visually clear without opening a separate RSI pane.
22. Alerts
The indicator includes alert conditions for key events:
Bullish BOS
Bearish BOS
Bullish CHoCH
Bearish CHoCH
Bullish FVG
Bearish FVG
These alerts can be used in TradingView’s alert system.
Alert messages include the ticker and timeframe.
Alerts are informational only. They do not guarantee that price will continue, reverse or react from a specific level.
23. Best use cases
This indicator can be useful for traders who want to:
read market structure directly on the chart,
identify BOS and CHoCH events,
focus only on unmitigated FVG zones,
reduce chart clutter from old mitigated gaps,
color candles using RSI-based logic,
combine price action structure with momentum context,
create alerts for structure breaks and new FVG zones.
It can be used for manual analysis, replay study, backtesting ideas visually and building a structured market view.
24. Suggested workflow
One possible way to use the indicator is:
First, observe the broader market structure using BOS and CHoCH.
Second, identify whether price is forming bullish or bearish imbalance zones through FVG.
Third, use the RSI candle coloring as additional momentum or trend-strength context.
Fourth, wait for your own confirmation before making any trading decision.
The indicator is designed to support analysis, not replace the trader’s decision-making process.
25. Important limitations
This indicator does not predict future price movement.
A BOS does not guarantee trend continuation.
A CHoCH does not guarantee a reversal.
An FVG does not guarantee that price will return to the zone or react from it.
RSI candle colors do not guarantee profitable entries.
Market structure, imbalance and momentum tools should be combined with risk management, market context and proper testing.
The behavior of the indicator may vary depending on:
market,
timeframe,
liquidity,
volatility,
session,
spread,
data provider,
chosen settings.
26. Repainting and confirmation notes
The indicator uses pivot-based swing detection for BOS and CHoCH.
Pivot points require future candles to confirm a swing high or swing low. Because of this, structure levels are identified only after the pivot is confirmed.
The script includes confirmation settings to reduce unstable real-time behavior.
Using candle-close confirmation can make signals more stable, but it may also make them appear later.
This is a normal trade-off between speed and reliability.
27. Educational disclaimer
This script is provided for educational and analytical purposes only.
It is not financial advice, investment advice or a recommendation to buy or sell any market.
Trading involves risk, and past chart behavior does not guarantee future results.
Each trader should test the indicator, understand its logic and use proper risk management before applying it in live market conditions.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
Giving My Money Bro!!! Pan Bystry
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
Giving My Money Bro!!! Pan Bystry
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。