// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // © maruful_ //@version=5 indicator("Maruf", overlay = true) fast = input( 12, "Number of candles, short length") slow = input( 24, "Number of candles, long length") region_based = input( 8, "Asia-London-NY") ema_fast = ta.ema( close, fast) ema_slow = ta.ema( close, slow) // Average if high-s && low-s ema_high = ta.ema( close, region_based) ema_low = ta.ema( close, region_based) // color the candlesticks barcolor( close > ema_high ? color.rgb(0, 153, 153) : color.white ) bgcolor ( close < ema_low ? color.rgb(249, 6, 103) : color.rgb(0, 0, 0)) // //barcolor( a > close ? color.rgb(246, 11, 128) : color.rgb(26, 216, 172)) // MACD calculation slow_macd = input (7, "Slow MACD") fast_macd = input (70, "Fast MACD") signalLength_macd = input (7, "MACD signal length") [_, signalLine, _] = ta.macd(close, fast_macd, slow_macd, signalLength_macd) // === plotting === plot(signalLine, color=#13d0f1)