changePercent(source) Returns the one-bar change percentage of the source. Parameters: source (float)
calculateKellyRatio(returns) Calculates the Kelly Ratio. Parameters: returns (array<float>)
calculateAdjustedKellyFraction(kellyRatio, riskTolerance, fedStance) Calculates the adjusted Kelly Fraction. Parameters: kellyRatio (float) riskTolerance (float) fedStance (string)
sumArray(arr) Sums the elements of a float array. Parameters: arr (array<float>)
calculateStdDev(returns) Calculates the standard deviation of an array of returns. Parameters: returns (array<float>)
calculateMaxDrawdown(returns) Calculates the maximum drawdown from an array of returns. Parameters: returns (array<float>)
calculateEV(avgWinReturn, winProb, avgLossReturn) Calculates the Expected Value (EV) of a bet. Parameters: avgWinReturn (float) winProb (float) avgLossReturn (float)
calculateTailRatio(returns) Calculates the Tail Ratio. Parameters: returns (array<float>)
calculateVaR(returns, confidenceLevel) Calculates the Value at Risk (VaR). Parameters: returns (array<float>) confidenceLevel (float)
calculateCVaR(returns, varValue) Calculates the Conditional Value at Risk (CVaR). Parameters: returns (array<float>) varValue (float)
calculateRollingStdDev(returns, window) Calculates the rolling standard deviation of returns. Parameters: returns (array<float>) window (int)
calculateRollingMean(returns, window) Calculates the rolling mean of returns. Parameters: returns (array<float>) window (int)
determineMarketRegime(priceChanges) Determines the market regime based on price changes. Parameters: priceChanges (array<float>)
classifyVolatilityRegime(volatility) Classifies the volatility regime. Parameters: volatility (array<float>)
Biblioteca do Pine
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 publications is governed by House Rules.
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
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 publications is governed by House Rules.
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.