Price Movement Trend By Alireza Phoenix (Logarithmic)
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
//@version=5
// © AlirezaPhoenix
// ══════════════════════════════════════════════════════════════════════════════════════════════════ //
//# * ══════════════════════════════════════════════════════════════════════════════════════════════
//# *
//# * Study       : Price Movement Trend By Alireza Phoenix (Logarithmic)
//# * Author      : Alireza Phoenix
//# *
//# * Version     : 1.1
//# * Release     : Oct 10, 2021
//# *  
//# *
//# * ══════════════════════════════════════════════════════════════════════════════════════════════
// ══════════════════════════════════════════════════════════════════════════════════════════════════ //


indicator("Price Movement Trend By Alireza Phoenix (Logarithmic)" , shorttitle="PMT By Alireza Phoenix" , overlay=false  )
len = 60
len2 = 90
len3 = 1

src1 = high
src2 = low
src3 = ( src1 + src2 ) / 2
src = close
out = ta.rma(src, len)
out2 = ta.ema(src, len2)
out3 = ta.sma(src, len3)
out4 = ta.sma(src3 , 1)


t = math.log(out)
t2 = math.log(out2)
t3 = math.log(out3)
t4 = math.log(out4)

offset = 20
offset1 = 0
RMAplot = plot(t, color=color.red, title="Leading Line" , offset=offset )
EMAplot = plot(t2, color=color.green, title="Signal Line" , offset = offset1)
plot(t3 , color=color.blue , title="PRICE line")
plot(t4 , color=color.new(color.maroon , 20) , title = "PRICE Average Line" , display=display.none )

fill(RMAplot, EMAplot, t2[offset1]>t[offset] ? color.new(color.green, 70) : color.new(color.red, 70) , title= "Price Movement Trend Cloud"  )