OPEN-SOURCE SCRIPT

Percent Calculator (Return On Investment Target Price)

已更新
First and foremost: I was inspired to publish my first script after reading some of the other member's scripts -a token of my appreciation and support, Thank You.

The percent calculator is a very simple and basic indicator to use, it''s function is to simply output the target price from either the close or ones trade-entry based on a desired percent return on investment (R.O.I.).

Say you want to profit 15% from your entry: simply plug in your entry value and the number 15 into the appropriate settings and the indicator displays what the target price should be (rounded to two decimal places).

The percent calculator also goes one step further by finding the average percent return on investment over a desired interval of time (the default is 20 candles) as well as allows one to adjust the size of the price move the average percent return on investment is being calculated for.

Say you want to find the average percent return on investment for a 3 candle swing over a 200 candle interval of time: simply plug the number 200 into the interval setting and the number 3 into the price-move setting and the indicator displays what the average 3 candle swing returns on investment.

Practical Application: comparing ones desired return on investment to the average return on investment can help determine how realistic ones goals are... it's unlikely to achieve 100% return on investment if the average is only around 10% (given the parameters one is working within) but on the other hand achieving 5% return on investment is highly likely.
版本注释
I debugged the code to calculate the average percent return on investment from the entry price when the option to use the close is deselected. Now one can compare their chosen target price given their preferred R.O.I. versus/to the target price using the average R.O.I. (given the average's parameters).
版本注释
_Cleaning up
版本注释
Bug Fix
Trend Analysis

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?

免责声明