OPEN-SOURCE SCRIPT
Candle Color Setup (SMA/EMA/VWMA/HMA/T3/WMA/VMA)

📘 Candle Coloring by Moving Average — Indicator Explanation (English)
This indicator colors candlesticks based on their position relative to a selected moving average. It helps traders visually identify bullish and bearish momentum by highlighting candles that are above or below the trend line.
🔧 Configurable Parameters
• Price Source: Choose which price to use for the moving average (e.g., close, open, hlc3).
• MA Type: Select from EMA, SMA, VWMA, HMA, Tilson, etc.
• MA Period: Set the number of bars used to calculate the moving average.
• Plot MA Line: Option to display the moving average on the chart.
• Buy Color: Candles above the MA are colored (e.g., blue).
• Sell Color: Candles below the MA are colored (e.g., red).
• Transparency: Adjust how visible the candle colors are (0 = solid, 100 = invisible).
• Tilson vFactor: If using Tilson MA, this controls the smoothing factor.
📈 How It Works
• When the candle’s close is above the moving average → it’s colored with the buy color.
• When the candle’s close is below the moving average → it’s colored with the sell color.
• The moving average acts as a dynamic trend filter, helping you spot directional bias at a glance.
🎯 How to Use It
• Use the colored candles to confirm trend direction.
• Combine with other indicators for entry/exit signals.
• Adjust MA type and period to match your strategy (e.g., short-term EMA for scalping, long-term SMA for swing trading).
• Use Tilson for smoother transitions if you prefer less noise.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.