Heikin_Ashi_Homma
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © jacobfabris

//@version=5
indicator("Heikin_Ashi_Homma",overlay=false)
abre = request.security(ticker.heikinashi(syminfo.tickerid),timeframe.period,open)
pico = request.security(ticker.heikinashi(syminfo.tickerid),timeframe.period,high)
fundo = request.security(ticker.heikinashi(syminfo.tickerid),timeframe.period,low)
cor = close > abre ? color.green : color.red
plotcandle(abre,pico,fundo,close,color=cor)
period1 = input(defval = 8)
period2 = input(defval = 34)
period3 = input(defval = 144)
weigth_close = input.float(defval = 0.8)
weigth_open = input.float(defval = 0.2)
spot = (close*weigth_close+abre*weigth_open)
m1 = ta.ema(spot,period1)
m2 = ta.ema(spot,period2)
m3 = ta.ema(spot,period3)
plot(m1,color=color.aqua,linewidth=2)
plot(m2,color=color.blue,linewidth=2)
plot(m3,color=color.navy,linewidth=2)