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
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
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