OPEN-SOURCE SCRIPT

% Sensitivity MA

Atualizado
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!
Notas de Lançamento
>>>
close > ma? ---> green if true, otherwise red.
Moving Averages

Script de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?

Aviso legal