nojd0

Simple rate of return comparison

nojd0 Updated   
This simple indicator compares RoR for up to eleven assets over a period described by the "Offset" input variable.

RoR type may be:
  • Classical logarytmic RoR: log((Po - Pn)/Po).
  • Percent growth: (Po - Pn)/Po.
  • Fiat evaluaton based on "Budget" input roperty: $ * (Po - Pn)/Po.

If the "Relative" option is selected, the RoR of the base asset will be deducted from the asset's ROR.
If the "SMA easing" option is selected, RoRs will be eased by a simple moving average of "Offset" bars.
Release Notes:
Return calculation was wrong, also fixed labels.
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 a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?