Hi all! This script allows an alert option for conditions when the price increase 10% from the SMA and when price decrease 10% from the SMA. The SMA length defaults to 20, but can be set to any length of your preference at “length” in the inputs tab of the script settings. Value that increase and decrease 10% from SMA is able to visualize with a line but it can also be hidden in the Style tab. Also, the default is 10%, but you can set % value of your preference such as 2%, 5%, at "% value" in the inputs tab.
For example with the default settings, if you set the alert condition "% up SMA" in the Alert settings dialog, this alert will be triggered when the price increase 10% from SMA. "% down SMA" will be triggered when the price decrease 10% from SMA.