Deviation from Average
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © xlpguckerx

//@version=4
study("Deviation from Average",overlay=false)
a=sma(close,20)
b=a-close
c=b/a
plot(-c*100)