Aki_Pine1024

NumberOfSharesBuy

Library "NumberOfSharesBuy"
Library for the number of shares purchased

SizeCalc(totalAssets, unit, lossPercent, maxLossPerShere) Calculate the number of shares to be purchased from the initial capital and the maximum loss per share
Parameters:
  • totalAssets: Initial capital
  • unit: A unit of the number of shares to be traded in one trade
  • lossPercent: What percentage of loss is allowed in one loss cut
  • maxLossPerShere: Maximum loss per share
Returns: Number of shares purchased
=====================================
ライブラリ "株数に関するライブラリ"

SizeCalc(totalAssets, unit, lossPercent, maxLossPerShere) 初期資本と一株当たり最大損失から購入株数を求める
引数一覧:
  • totalAssets: 初期資本
  • unit: 一回のトレードで行う株数の単位
  • lossPercent: 一回の損切で何%までの損失を許容するか
  • maxLossPerShere: 一株当たり最大損失
戻り値: 購入株数

Pine library

In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in a publication is governed by House Rules.

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 library?

Copy the following line and paste it in your script.