OPEN-SOURCE SCRIPT
업데이트됨 EMA/SMA Ribbon

This indicator plots a two-line moving-average ribbon built from:
15-period EMA calculated on OHLC4 (Open+High+Low+Close)/4, with no offset
22-period SMA calculated on OHLC4, plotted with an offset of +6 bars
The space between the two averages is filled to form a ribbon:
Green ribbon when the EMA is above the SMA (using the SMA’s plotted/offset position so the color matches what you see on the chart)
Red ribbon when the SMA is above the EMA
Notes / Behavior:
The indicator uses the chart timeframe (no custom timeframe logic).
Because the SMA is intentionally shifted forward by 6 bars, the ribbon color is calculated against the visually aligned SMA so the color reflects the displayed relationship between the two lines.
No crossover markers or dots are plotted (ribbon-only).
How to use:
Use the ribbon color as a quick visual trend bias:
Green generally suggests bullish bias (EMA leading above the shifted SMA)
Red generally suggests bearish bias (EMA below the shifted SMA)
15-period EMA calculated on OHLC4 (Open+High+Low+Close)/4, with no offset
22-period SMA calculated on OHLC4, plotted with an offset of +6 bars
The space between the two averages is filled to form a ribbon:
Green ribbon when the EMA is above the SMA (using the SMA’s plotted/offset position so the color matches what you see on the chart)
Red ribbon when the SMA is above the EMA
Notes / Behavior:
The indicator uses the chart timeframe (no custom timeframe logic).
Because the SMA is intentionally shifted forward by 6 bars, the ribbon color is calculated against the visually aligned SMA so the color reflects the displayed relationship between the two lines.
No crossover markers or dots are plotted (ribbon-only).
How to use:
Use the ribbon color as a quick visual trend bias:
Green generally suggests bullish bias (EMA leading above the shifted SMA)
Red generally suggests bearish bias (EMA below the shifted SMA)
릴리즈 노트
What changedAdded 3 extra EMAs:
EMA 9 (default: orange, slim, solid)
EMA 20 (default: yellow, slim, solid)
EMA 50 (default: green, slim, solid)
Added 3 extra SMAs:
SMA 100 (default: purple, slim, dashed)
SMA 150 (default: blue, slim, dashed)
SMA 200 (default: red, normal thickness, dashed)
Customization added (for each of the 6 new MAs)
Each of the new moving averages has independent controls for:
Length (fully editable)
Color
Line thickness
Line style: Solid / Dotted / Dashed
Dotted uses a dot-style plot.
Dashed is implemented as a dash-step effect (plots the line at intervals) because TradingView plot() does not support true dashed strokes directly.
What did NOT change
The original EMA15 / SMA22 Ribbon logic is unchanged:
same sources (ohlc4)
same lengths (EMA 15 / SMA 22)
same SMA offset behavior (offset 6)
same ribbon color logic (based on what you visually see)
still no cross dot
Why this update matters
This keeps the ribbon as the main trend/condition layer, while adding standard “structure” moving averages (short EMAs + long SMAs) for multi-timeframe context and cleaner discretionary decision support.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.