ChrisMoody

CM_Modified_Heikin-Ashi_TrendBars

Created By Request for lucalucious

Allows for EMA Smoothing with different values for Up and Down Trend.

Ability to Plot EMA to see Trend Filter
Remove from Favorite Scripts Add to Favorite Scripts
//Created by Chrismoody on 7/22/2014 By Request for user lucalucious
//Modified Heikinashi with EMA Filter...
//Choice To Plot EMA Trend Is Based Off Of
study(title = "CM_Modified_Heik_Trend_Bars", shorttitle="CM_TrendBars",overlay=true)
note = input(false, title="Lower Numbers = More Sensitive to Price Change...Higher Numbers = Less Sensitive")
uema = input(34, minval=1, maxval=50, title="EMA UpTrend")
dema = input(34, minval=1, maxval=50, title="EMA DownTrend")
shema = input(false, title="Show EMA Trend is Based On?")

haclose = (open + high + low + close)/4
haopen = na(haopen[1]) ? (open + close)/2 : (haopen[1] + haclose[1]) / 2

upEma = ema(haclose, uema)
downEma = ema(haopen, dema)

emaAvg = (upEma + downEma)/2

heikUpColor() => hlc3 >= emaAvg
heikDownColor() => hlc3 < emaAvg

col = hlc3 >= emaAvg[1] ? lime : hlc3 < emaAvg[1] ? red : white

barcolor(heikUpColor() ? lime: heikDownColor() ? red : na)
plot(shema and emaAvg ? emaAvg : na, title="EMA UpTrend", style=line, linewidth=3, color=col)
Hi Chris, how does this work?
Reply
Have made some serious money on nadex with this script, thanks
Reply
for what time frame?
Reply
Hello this is a great indicator!One question though ...I am new on this and i have tried out to create an alert when colours turn from red to green and the opposite.
Can it be done?
Reply
ChrisMoody PRO xariskontos
Funny You asked...I just posted a video on ho wto do this...Go to the thread below and check out the video...If you have trouble following the instructions for this indicator make a request on the link below...and I will help you out...


Reply
For example:

- http://i.imgur.com/NbZRJBd.png (Amazon, weekly chart)

That's a screen shot of Amazon weekly. The top blue arrow points to the 4-week EMA that your indicator bases the bar color on. It's a 4 week EMA (up & down). The lower blue arrow points to a standard 4-week EMA plotted on price (blue line).

As of the close of this week (last week in Oct. 2014), price has closed above the standard 4-week EMA, but not above the 4-week EMA that is plotted by your indicator. Which is why I was wondering if there was some kind of smoothing or if it was based on the slope of the EMA or if the calculations were based on something other than the close of price because it isn't matching up to a generic, out-of-the-box EMA.

Any thoughts would be great. Thanks.

Cheers. :-)
Reply
All you have to do is go to the Inputs Tab. It defaults to a 34 EMA for the up trend and down trend. you can modify the UpTrend eMA and the DownTrend EMA values in the inputs tab. If you select the last checkbox it plots the ema on the screen. You can clearly see if the Price (HLC/3) is above the EMA the bars color green. Or red if price is below the EMA. it uses a EMA Avg if you change the values so they are different on the UpTrend and Down Trend. So if you keep the values the same for both...then that is what they use.

If you keep the defaults at 34...and check the last checkbox to show EMA.... and you plot a regular 34EMA as another indicator....Then the plots are almost identical. The difference is the EMA's I use are based on the True Heikin-Ashi Close. Hence the title....Modified Heikin-Ashi. Whereas the EMA from the the indicators you plot is based off the Close...Not the Heikin-Ashi Formula.
+1 Reply
Shepard PRO ChrisMoody
"...The difference is the EMA's I use are based on the True Heikin-Ashi Close. Hence the title....Modified Heikin-Ashi. Whereas the EMA from the the indicators you plot is based off the Close...Not the Heikin-Ashi Formula."

Excellent. That makes sense. Appreciate the reply and info. Thanks.

Cheers. :-)
Reply
This is the script you were probably thinking of. Note..it still uses the HLC/3 to change the Bar color...this filters out false breaks above below the EMA.


+2 Reply
ChrisMoody PRO ChrisMoody
That will match any EMA you plot on the chart perfectly
Reply
United States
United Kingdom
India
Deutschland
France
España
Italia
Polska
Türkiye
Россия
Brasil
Indonesia
Malaysia
Việt Nam
日本
한국
简体
繁體
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Priority Support Contact Support Ideas Published Followers Following Private Messages Chat Sign Out