Harold_NL

GRaB Candles by mattlacoco with Murrey Math Midline

(use V1.1 now See links below)

GRaB candles and a murrey math "midline" in one script.
Some traders using methods of Rob Booker (40% club, trifecta5) like to use both GRaB candles and Murrey Math to combine, or to compare entry and exit moments.
Color of candles are as GRaB candles.
Midline use: Crossing the midline is a change of color in murrey. Candles closing above the midline would be green and below would be red as murrey candles.

Credits:
Original script of Raghee Horner's GRaB Candles by Matt Lacoco (BUY BLUE SELL RED).
Murrey Math Midline added by Harold van Berk (most code copied from "UCS_Murrey's Math Oscillator_V2" by ucsgears)
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
study(title='Buy Blue Sell Red', shorttitle='BBSR', overlay=true)

// plot midline from Murrey Math for trifecta entry and exit
// Inputs
length = input(100, minval = 10, title = "Look back Length")
mult = input(0.125, title = "Mutiplier; Only Supports 0.125 = 1/8")
lines = input(true, title= "Show Murrey Math Fractals")
bc = input(true, title = "Show Bar Colors Based On Oscillator")

// Donchanin Channel
hi = highest(high, length)
lo = lowest(low, length)
range = hi - lo
multiplier = (range) * mult
midline = lo + multiplier * 4

plot (midline)
// end MMM line

// 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)