New toPercent Higher-Order Indicator

I’ve been seeing a lot of people want to ‘overlay’ different indicators, especially indicators that work best in their own chart space (like RSI, MACD, and other oscillators). The issue with overlaying indicators and especially oscillators is the scale of the indicators used. Typically the scale doesn’t match up well. But I realize some other platforms natively support this, so I went ahead and made an indicator who’s entire purpose is to be used as a wrapper around an input indicator. The indicator is called toPercent and it transforms a set of data into a value between 0-100 using a standard statistical normalization function multiplied by 100.

Install it here.

Use it in a Worksheet, a period of 0 considers all loaded elements, while a period of anything greater than zero will consider that number of consecutive elements.

Or take another indicator’s output as input. First add the base indicator and indicator you want to convert to a percent value. Then add the toPercent indicator from ‘Utility’ → ‘toPercent’. Under ‘Input’ choose one of the output values from the indicator you want to convert. Then under ‘Add as…’ choose ‘Area’ and select the base indicator. Here’s an example using the builtin indicators MACD and RSI:

Put RSI and MACD in the space:

Add the toPercent indicator:

Result, macd normalized value is plotted over RSI:

You can make the base indicator a toPercent chart to convert the indicator you want to overlay into a percent value as well. RSI already works on a 0-100 scale, but many oscillators do not.


Hi, When using the toPercent Indicator how do you change the settings for the input indicator? ex: if I replicate your example, how do I set the MACD settings or does it use whatever is the default settings for the indicator?


Depends on how you configure the MACD. If you use Worksheets like my example, you can parameterize the MACD within the worksheet. Be aware that MACD exposes several outputs, so you’ll have to choose one with the . operator. You can also use toPercent in a regular chart space. Add it like a normal indicator, but look at the ‘Input’ dropdown and choose the output from your charts that you want to convert toPercent.

Here’s how to use MACD with toPercent in a worksheet. Remember macd could be any indicator output value. Whatever parameters that indicator accepts, you’ll need to provide (or it will go to default if you do something like macd().macd for example). macd has fast, slow, and signal parameters. Here, 12, 26, and 9 (the defaults, I may just as well have called it with no params).

Okay thanks for the clarification