PINE LIBRARY

bullratio

Library "bullratio"
Calculate the profit/loss ratio of a permabull for configurable time range

bullratio(len)
  calculates the profit/loss ratio for a permabull of age len
  Parameters:
    len: the number of candles to include in the running bull ratio - 0 for all time
  Returns: series float of profit/loss percentage
techindicatorvolumepriceanalysis

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