ChrisMoody

CM EMA Trend Bars

צפיות ‎12900‎
3625
12900 10
This Code Simply Changes the Bar Colors based on if the Bar is Above or Below the EMA .

Inputs via the Inputs Tab:
Ability to change the EMA Period.
Ability to Turn On/Off the EMA Plotted on the Screen

***Note - I used the HLC/3 To determine if the bar/candle is above or below the EMA . This Filters out the Chop and gets rid of many of the False Breaks above or below the EMA .
הסר מסקריפטים מועדפים הוסף לסקריפטים מועדפים
//Created by ChrisMoody on 11/1/2014
//Bar Color Based on Above/Below EMA...
study(title = "CM_EMA Trend Bars", shorttitle="CM_EMA TrendBars",overlay=true)
ema1 = input(34, minval=1, maxval=300, title="EMA UpTrend")
shema = input(true, title="Show EMA Trend is Based On?")

usedEma = ema(close, ema1)

emaUpColor() => hlc3 >= usedEma
emaDownColor() => hlc3  < usedEma

col = hlc3  >= usedEma ? lime : hlc3  < usedEma ? red : white

barcolor(emaUpColor() ? lime: emaDownColor() ? red : na)
plot(shema and usedEma ? usedEma : na, title="EMA", style=line, linewidth=3, color=col)

תגובות

Hi Chris, great script. Is there anyway of adding alerts to bar colour changes? I’ve had a crack at it but can’t get it to work...
+3 השב
Kiranime btcjeanralphio
@btcjeanralphio, im looking for the same thing!
השב
Hi Chris,

Do you know how to adjust the code to get it to work on a Renko chart?

Thanks!
+1 השב
Hi Chris, really useful script! is there a way to set bar colour transparency to ) by default? i find it skips around when adding ema. Thank you!
השב
Hi Chris...

What do I need to remove in the source code to remove the "HLC/3" filter? I'd like to use this, but to just color the bars as they close above/below an EMA (but without the "HLC/3" filter).

Thanks. :-)
השב
The filter was created b/c Price being above or below the EMA line is what creates the bar coloring. I could create an indicator with options of what to use...but in the meantime everywhere you see hlc3 change that to whatever you want...example close, hl2, open, high, low, ohlc4, etc. Close would be the standard...but I found hlc3 which is taking the High + Low + Close and dividing by 3 helped filter out the Choppiness of color changing when price is going back and forth across the EMA.

Let me know if that didn't answer your question.
+5 השב
Shepard ChrisMoody
Thanks! That answered my question perfectly. I appreciate the reply. Thanks for your time and great work.

Cheers. :-)
השב
No Problem
השב
Hey Chris happy New Year to you and family. I have been following your technical indicators for about a month now. Based on your analysis of the market for the EURUSD I noticed that there is a major breach of support on the downside for the monthly chart for EURUSD could you tell what this means is the currency going to go lower.
השב
Just saw your comment....missed it somehow.

Feel free to ask again when we are at a level your not sure about...
השב
בית סורק מניות סורק מט"ח סורק מטבעות-קריפטו יומן כלכלי איך זה עובד‏ תכונות גרף מחירון הפנה חבר חוקי הבית מרכז תמיכה כלים לאתרים וברוקרים יישומונים פתרונות גרפיים ספריית גרפים קלי משקל בלוג וחדשות טוויטר‏
פרופיל הגדרות פרופיל חשבון וחיוב הפנה חבר לשוניות התמיכה שלי מרכז תמיכה רעיונות שפורסמו עוקבים עוקב אחרי... הודעות פרטיות צ'אט התנתק