Ratio MA100/MA200
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © peterbutterknife

//@version=4
study("WeekMA100200")
sma100 = sma(close, 100)
sma200 = sma(close, 200)
ratio = sma100/sma200
dif = log(sma100-sma200)
Change = (ratio-ratio[120])
Time = input(1, minval=1)
velocity=Change-Change[120]
Velocity = Change/Time
Delta_Velocity= (Velocity-Velocity[1])
aceleration = Delta_Velocity/Time
Delta_Aceleration = (aceleration-aceleration[1])


// Plot values
//plot(series=sma100, color=color.lime, linewidth=2)
//plot(series=sma200, color=color.fuchsia, linewidth=2)
plot(series=ratio, color=color.blue, linewidth=3)
//plot(series=dif, color=color.blue, linewidth=2)
//plot(series=velocity, color=color.purple, linewidth=2)
//plot(series=aceleration, color=color.red, linewidth=3)
//hline(0, title="Zero", color=color.gray, linestyle=hline.style_dashed)

    

