PROTECTED SOURCE SCRIPT
Breaking Structures (javieresfeliz)

This TradingView script is designed to identify market structure changes, using a break of highs and lows approach, as well as technical indicators such as ATR, RSI, and EMAs (Exponential Moving Averages). It is aimed at detecting bullish and bearish trends, signaling possible entry and exit points based on various factors. It also offers additional confirmations to avoid false signals and provides a clear visualization of buy and sell signals.
Main Features:
Indicators Used:
ATR (Average True Range): Used to calculate a volatility range, which helps set stop-loss levels and price targets based on the current market volatility.
EMAs (50 and 200): Exponential Moving Averages (EMAs) are used to determine the short-term and long-term trends. The 50-period EMA is used to identify the short-term trend, while the 200-period EMA is used to identify the long-term trend.
RSI (Relative Strength Index): Used to identify overbought or oversold conditions in the market, providing additional buy or sell signals.
Volume: Used to confirm the validity of a signal. An increase in volume can confirm a structure break and provide more reliability to the signal.
Break of Structure Detection (BOS):
Bullish Break: Generated when the price surpasses previous highs.
Bearish Break: Generated when the price falls below previous lows.
Change of Character (CHOCH):
Bullish Trend: Defined by a close above the open and above the 50 EMA.
Bearish Trend: Defined by a close below the open and below the 50 EMA.
Buy and Sell Conditions:
Buy (Long): Activated when several conditions are met, including a bullish change of character, a bullish structure break, the price closing above the previous value plus a multiple of the ATR, and additional confirmations from RSI and volume.
Sell (Short): Activated when several conditions are met, including a bearish change of character, a bearish structure break, the price closing below the previous value minus a multiple of the ATR, with additional confirmations from RSI and volume.
Entry and Exit Signals:
Long Entry (Buy): Executed when the buy conditions are met.
Short Entry (Sell): Executed when the sell conditions are met.
Position Close: Positions are closed when the price crosses below (for long positions) or above (for short positions) the 50 EMA.
Historical Highs and Lows Lines:
The script draws lines of historical highs and lows from the last 288 and 60 periods to show key support and resistance levels on the chart.
Signal Table Across Multiple Timeframes:
The script displays a table in the top-right corner of the chart with indicators like the EMA trend, RSI value, and MACD histogram for timeframes of 1 minute, 5 minutes, 30 minutes, 1 hour, 4 hours, daily, and weekly.
Precautions:
Does not guarantee profits: Although the script is designed to detect structure breaks and possible trend changes, it does not guarantee 100% profitable signals. The market is always subject to risk and unpredictable volatility.
Requires adjustments for each asset: Parameters such as ATR length and EMA lengths should be adjusted according to the asset being analyzed and market conditions.
Use of additional confirmations: To reduce false signals, the script uses additional confirmations like RSI and volume, but it is always recommended to perform additional analysis before making trading decisions.
Changing trends: The change of character (CHOCH) can be a useful indicator, but it can give false signals in highly volatile markets or during prolonged consolidations.
Relies on historical data: This script relies on historical data to identify highs and lows. It does not consider fundamental events that may significantly impact the market.
Requires constant monitoring: Although the signals are automated, it is important to monitor open positions and make adjustments if market conditions change.
Risk of false signals: In low liquidity markets or consolidations, structure breaks can be false, so it’s recommended to pay attention to any additional confirmation signals or use a proper risk management strategy.
Main Features:
Indicators Used:
ATR (Average True Range): Used to calculate a volatility range, which helps set stop-loss levels and price targets based on the current market volatility.
EMAs (50 and 200): Exponential Moving Averages (EMAs) are used to determine the short-term and long-term trends. The 50-period EMA is used to identify the short-term trend, while the 200-period EMA is used to identify the long-term trend.
RSI (Relative Strength Index): Used to identify overbought or oversold conditions in the market, providing additional buy or sell signals.
Volume: Used to confirm the validity of a signal. An increase in volume can confirm a structure break and provide more reliability to the signal.
Break of Structure Detection (BOS):
Bullish Break: Generated when the price surpasses previous highs.
Bearish Break: Generated when the price falls below previous lows.
Change of Character (CHOCH):
Bullish Trend: Defined by a close above the open and above the 50 EMA.
Bearish Trend: Defined by a close below the open and below the 50 EMA.
Buy and Sell Conditions:
Buy (Long): Activated when several conditions are met, including a bullish change of character, a bullish structure break, the price closing above the previous value plus a multiple of the ATR, and additional confirmations from RSI and volume.
Sell (Short): Activated when several conditions are met, including a bearish change of character, a bearish structure break, the price closing below the previous value minus a multiple of the ATR, with additional confirmations from RSI and volume.
Entry and Exit Signals:
Long Entry (Buy): Executed when the buy conditions are met.
Short Entry (Sell): Executed when the sell conditions are met.
Position Close: Positions are closed when the price crosses below (for long positions) or above (for short positions) the 50 EMA.
Historical Highs and Lows Lines:
The script draws lines of historical highs and lows from the last 288 and 60 periods to show key support and resistance levels on the chart.
Signal Table Across Multiple Timeframes:
The script displays a table in the top-right corner of the chart with indicators like the EMA trend, RSI value, and MACD histogram for timeframes of 1 minute, 5 minutes, 30 minutes, 1 hour, 4 hours, daily, and weekly.
Precautions:
Does not guarantee profits: Although the script is designed to detect structure breaks and possible trend changes, it does not guarantee 100% profitable signals. The market is always subject to risk and unpredictable volatility.
Requires adjustments for each asset: Parameters such as ATR length and EMA lengths should be adjusted according to the asset being analyzed and market conditions.
Use of additional confirmations: To reduce false signals, the script uses additional confirmations like RSI and volume, but it is always recommended to perform additional analysis before making trading decisions.
Changing trends: The change of character (CHOCH) can be a useful indicator, but it can give false signals in highly volatile markets or during prolonged consolidations.
Relies on historical data: This script relies on historical data to identify highs and lows. It does not consider fundamental events that may significantly impact the market.
Requires constant monitoring: Although the signals are automated, it is important to monitor open positions and make adjustments if market conditions change.
Risk of false signals: In low liquidity markets or consolidations, structure breaks can be false, so it’s recommended to pay attention to any additional confirmation signals or use a proper risk management strategy.
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.