mattlacoco

GRaB Candles

ema
Update to previous script.

Raghee Horners Wave and GRaB candles. Now show/hide the EMA "Wave". Paints candles according to close position relative to ema on high, low and close. Buy blue sell red.
Remove from Favorite Scripts Add to Favorite Scripts
study(title='Buy Blue Sell Red', shorttitle='BBSR', overlay=true)
// vars
emaPeriod = input(title="EMA Period", type=integer, defval=34)
showWave = input(title="Show Wave", type=bool, defval=false)

// build wave
emaHigh = ema(high,emaPeriod)
emaLow = ema(low,emaPeriod)
emaClose = ema(close,emaPeriod)

waveHigh = showWave == true ? emaHigh : na
waveLow = showWave == true ? emaLow : na
waveClose = showWave == true ? emaClose : na

plot(waveHigh, title="EMA High",color=red )
plot(waveLow, title="EMA Low", color=blue)
plot(waveClose, title="EMA Close", color=silver)

// paint candles according to close position relative to wave
barcolor(close < emaLow ? close > open ? red : maroon : close > emaHigh ? close > open ? blue : navy : close > open ? silver : gray)
Hi, there. Just wondering if on line 20 the term "close > open ? red : maroon" should be "close < open ? red : maroon" so that red would be the mirror image of blue (buy blue, sell red)?
Reply
whitaker.lisa BradGrigor
I made this edit to the script and it worked fine. Makes more sense too as I can now consider that "darker shade is a counter-candle".
+1 Reply
mattlacoco BradGrigor
It's written how it's intended, for both blues and reds, the darker colors are bears while brighter colors are bulls.
Reply
Really good Candle indicator here
Reply
English
English (UK)
English (IN)
Deutsch
Français
Español
Italiano
Polski
Türkçe
Русский
Português
Bahasa Indonesia
Bahasa Melayu
ภาษาไทย
Tiếng Việt
日本語
한국어
简体
台灣
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 Contact Support Ideas Published Followers Following Private Messages Chat Sign Out