WATR_Candles
Download scriptThis script is a sophisticated visual trading tool designed to transform standard price charts into dynamic, color-coded "smart candles." Instead of just showing you the raw price movement, it interprets market momentum and volatility to provide a clearer picture of the current trend.
Here is a breakdown of the logic used by the script:
Core Concept: Trend Awareness
The primary goal of this tool is to identify whether the market is in an upward or downward phase based on price action relative to historical volatility. It achieves this by calculating a "baseline" that shifts according to the Average True Range (ATR)—a standard measure of how much a currency pair typically moves.
How the Logic Works:
The script processes every price bar (candle) on your chart and follows these specific logical steps:
- Volatility-Adjusted Thresholds: It doesn't just look at whether the price went up or down by a tiny amount; it calculates a required movement "buffer." This ensures that minor, insignificant price fluctuations (market noise) don't trigger a change in trend detection.
- Dynamic Trend Tracking:
- Bullish Identification: If the price moves above the calculated upper threshold, the script recognizes an upward trend. It then locks onto this "high-water mark," ensuring that the trend is only considered "broken" if the price fails to maintain a certain level of strength.
- Bearish Identification: Conversely, if the price drops below the lower threshold, it identifies a downward trend and tracks the new "low-water mark."
- Anti-Trend Filtering: The script contains specific logic to identify "Anti-Trend Bars"—situations where a single candle moves aggressively against the established trend. This helps the tool stay stable and prevent it from "flipping" colors too quickly during brief, erratic price spikes.
Visual Output (Color Coding):
Once the script determines the trend and identifies the specific behavior of a candle, it applies one of five distinct colors to the chart:
- Bullish Trend / Strong Movement: Highlights candles that are moving in favor of the current uptrend.
- Bullish Trend / Weak/Corrective Movement: Highlights candles that are slightly retracing but still within an overall upward trend.
- Bearish Trend / Strong Movement: Highlights candles moving in favor of a downward trend.
- Bearish Trend / Weak/Corrective Movement: Highlights candles that are retracing while the primary trend remains down.
- Neutral/Gray: Used for segments where the trend is not clearly established or meets specific transition criteria.
Summary for the User:
Essentially, this script acts as a "filter" for your eyes. It strips away the confusion of messy price movements and replaces them with a visual narrative. By looking at the colors of the candles, you can instantly tell not only which direction the market is moving, but also how much conviction that move has based on the volatility of the recent past.
ÿþ/ / + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
/ / | W A T R _ C a n d l e s . m q 5 |
/ / | W r i t t e n W i z a r d S e r g u n d e r a r t i c l e k o n k o p i n |
/ / | "