periyot = input(title="ATR periyodu", type=input.integer, defval=10, minval=1, maxval=500)
coeff = input(title="coeff", type=input.integer, defval=3, minval=0, maxval=20)
movPeriyot = input(title="Mov Periyodu", type=input.integer, defval=10, minval=1, maxval=500)
hlc3 = (high + low + close) / 3
atr = atr(mov(hlc3, 2), periyot)
k = sma(hlc3, movPeriyot)
offset = coeff * atr
str = k + offset
plot(str, title="EngulfingCandle", color=color.blue)