OPEN-SOURCE SCRIPT
[TehThomas] - Displacement Candles

Overview:
This PineScript is designed to detect and visualize significant price movements, called displacements, on a trading chart. It's particularly useful for traders who want to identify potential trend changes or strong market sentiment quickly.
How the Script Works
User Input:
The script allows users to set a custom threshold for displacement detection and choose colors for bullish and bearish movements.
Displacement Detection Function:
Pine Script®
This function calculates the percentage change between the current and previous price.
If the change exceeds the set threshold, it's considered a displacement.
Bullish and Bearish Detection:
Pine Script®
Identifies whether the displacement is bullish (price increase) or bearish (price decrease).
Candle Coloring:
Pine Script®
Changes the color of candles based on the detected displacement type.
Usefulness and Applications:
This script is particularly handy for traders who want to cut through market noise and focus on significant price movements. It's versatile enough to be used across different trading strategies and can be a valuable addition to a trader's technical analysis toolkit.
It's a very easy script and not alot to mention. If you see any improvements please let me know.
This PineScript is designed to detect and visualize significant price movements, called displacements, on a trading chart. It's particularly useful for traders who want to identify potential trend changes or strong market sentiment quickly.
How the Script Works
User Input:
The script allows users to set a custom threshold for displacement detection and choose colors for bullish and bearish movements.
Displacement Detection Function:
isDisplacement(series, threshold) =>
percentage_change = math.abs(series - series[1]) / series[1] * 100
percentage_change > threshold
This function calculates the percentage change between the current and previous price.
If the change exceeds the set threshold, it's considered a displacement.
Bullish and Bearish Detection:
bullish_displacement = isDisplacement(close, threshold) and close > close[1]
bearish_displacement = isDisplacement(close, threshold) and close < close[1]
Identifies whether the displacement is bullish (price increase) or bearish (price decrease).
Candle Coloring:
barcolor(bullish_displacement ? bullish_color : bearish_displacement ? bearish_color : na)
Changes the color of candles based on the detected displacement type.
Usefulness and Applications:
- Trend Identification: Helps in quickly spotting potential trend changes or continuations.
- Volatility Analysis: Provides a visual representation of market volatility.
- Entry and Exit Signals: Can be used to identify potential entry or exit points for trades.
- Market Sentiment: Offers insights into the strength of bullish or bearish sentiment.
- Customizable Sensitivity: The adjustable threshold allows traders to fine-tune the indicator based on the asset's typical volatility.
- Visual Clarity: By changing candle colors, it provides a clear, at-a-glance view of significant price movements.
- Complementary Tool: Can be used alongside other technical indicators for confirmation of signals.
- Multiple Timeframe Analysis: Applicable across different timeframes to suit various trading styles (day trading, swing trading, etc.).
- Educational Purpose: Helps new traders understand and visualize significant price movements in the market.
- Backtesting: Can be incorporated into strategy backtests to assess its effectiveness in different market conditions.
This script is particularly handy for traders who want to cut through market noise and focus on significant price movements. It's versatile enough to be used across different trading strategies and can be a valuable addition to a trader's technical analysis toolkit.
It's a very easy script and not alot to mention. If you see any improvements please let me know.
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
𝟔 𝐘𝐄𝐀𝐑𝐒 𝐄𝐗𝐏𝐄𝐑𝐈𝐄𝐍𝐂𝐄𝐃 𝐓𝐑𝐀𝐃𝐄𝐑
🔵 Free Discord Community
🔵 Free Telegram Signals
🔵 VIP Elite - Learn how to master the markets
linktr.ee/TehThomas
🔵 Free Discord Community
🔵 Free Telegram Signals
🔵 VIP Elite - Learn how to master the markets
linktr.ee/TehThomas
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、この作者はスクリプトのソースコードを公開しているので、その内容を理解し検証することができます。作者に感謝です!無料でお使いいただけますが、このコードを投稿に再利用する際にはハウスルールに従うものとします。
𝟔 𝐘𝐄𝐀𝐑𝐒 𝐄𝐗𝐏𝐄𝐑𝐈𝐄𝐍𝐂𝐄𝐃 𝐓𝐑𝐀𝐃𝐄𝐑
🔵 Free Discord Community
🔵 Free Telegram Signals
🔵 VIP Elite - Learn how to master the markets
linktr.ee/TehThomas
🔵 Free Discord Community
🔵 Free Telegram Signals
🔵 VIP Elite - Learn how to master the markets
linktr.ee/TehThomas
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。