Electrified

Shares Risk (Long)

Electrified 已更新   
Ever struggle to know how many shares you should be placing your order with? Risk is different for every person and every stock. This can help.

In the example above, I've added this indicator the the chart.
I then specified:
  • Risk Amount ($) = $500. (The max amount I'm willing to risk.)
  • Risk Source = (another indicator) Lower Limit 3. (See Lower Limits for more details)
  • Source Risk (%) = 0.0 (The default is 5.0 expecting the Risk Source to be the close.**)

Based upon how much I'm willing to risk, and the price difference between the close and Risk Source, this indicator will show the number of shares to purchase such that if the price drops to the stop level specified, my value loss should be limited to the Risk Amount.

333 shares is the value calculated for this example (latest bar). You can easily see how many shares you need to purchase for the lastest bar as well as track the previous values on the chart and the indicator cursor data.

---
** WARNING: There's no magic here. It's just math. So if you specify another indicator as the source, the values could get a bit strange and if the price is very close to the stop level, the number of shares could be unreasonably high. To help avoid this you can increase the minimum percent.
版本注释:
Updated position of chart to make label more visible.
版本注释:
  • Improved label.
  • Used Local Limit 4 instead with corrected parameters.
版本注释:
Improved source value handling: Some sources are delayed because of their time frame and effectively report NaN until their next bar. This change persists their previously known value.
开源脚本

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

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?