EMA Slope AyE
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © fajardoarelys

//@version=4
strategy("EMA Slope AyE", shorttitle = "SLOPE", overlay=false)
EMAPeriod = input(20, title = "EMA Period", type = input.integer)
SlopePeriod = input(1, title = "Slope Period", type = input.integer)

EMA = ema(close, EMAPeriod)
Slope = (EMA - EMA[SlopePeriod]) / SlopePeriod

plot(Slope, color = color.yellow, linewidth = 2)
zero = hline(0, "zero", color=#787B86)