OPEN-SOURCE SCRIPT

% Sensitivity MA

Updated
Modifying an existing indicator is one thing, but creating an entirely new indicator is a totally different thing that involves even more creativity!
Today, I accomplished the latter by creating a brand new indicator. It's called "% Sensitivity MA". What does it do? Well, it's pretty much like any moving average, it tells you the trend. When the % Sensitivity MA is green, it's an uptrend, and vise versa for when it's red. Here's the calculation:

% Sensitivity MA (n,src) = ma.prev + (n/100) * (src - ma.prev)

where:
n - parameter that determines % sensitivity from 0 to 100.
src - parameter that determines the source. (default: close)
ma.prev - previous value of % Sensitivity MA.

Note:
- % Sensitivity MA has no parameter for lookback period.
- The n parameter is limited to a value between 0 and 100.
- Higher n values are more sensitive. (So, 100 is maximum sensitivity.)
- The value of the n parameter can have an unlimited number of decimal places. (making this indicator very precise!)
- I recommend n values closer to 0 than 100.
- For the source, I recommend closing prices.

Good luck, and enjoy!
Release Notes
>>>
close > ma? ---> green if true, otherwise red.
Moving Averages

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer