PINE LIBRARY

ScalpingMetricsLib

已更新
Library "ScalpingMetricsLib"

winRate(wins, totalTrades)
  Parameters:
    wins (float)
    totalTrades (float)

riskRewardRatio(avgProfit, avgLoss)
  Parameters:
    avgProfit (float)
    avgLoss (float)

profitFactor(totalProfit, totalLoss)
  Parameters:
    totalProfit (float)
    totalLoss (float)

avgTradeDuration(totalDuration, totalTrades)
  Parameters:
    totalDuration (float)
    totalTrades (float)

slippageSensitivity(slippage, totalProfit)
  Parameters:
    slippage (float)
    totalProfit (float)

equityMaxDrawdown(equityHigh, equityLow)
  Parameters:
    equityHigh (float)
    equityLow (float)

sharpeRatio(avgReturn, stdDev)
  Parameters:
    avgReturn (float)
    stdDev (float)

sortinoRatio(avgReturn, downsideDev)
  Parameters:
    avgReturn (float)
    downsideDev (float)

maxConsecutiveLosses(lossArray)
  Parameters:
    lossArray (array<float>)

omegaRatio(totalWins, totalLosses)
  Parameters:
    totalWins (float)
    totalLosses (float)

latencySensitivity(latency)
  Parameters:
    latency (float)
版本注释
v2

Added:
curve(disp_ind)
  Call function to get a certain curve of your strategy.
  Parameters:
    disp_ind (string)
  Returns: Returns type of curve plot.

cleaner(disp_ind, plot)
  Call function to filter out your Strategy plots
  Parameters:
    disp_ind (string)
    plot (float)

cobraTable(option, position)
  Assign this function to a random variable to get the "Performance Table"
  Parameters:
    option (simple string)
    position (simple string)

Removed:
winRate(wins, totalTrades)

riskRewardRatio(avgProfit, avgLoss)

profitFactor(totalProfit, totalLoss)

avgTradeDuration(totalDuration, totalTrades)

slippageSensitivity(slippage, totalProfit)

equityMaxDrawdown(equityHigh, equityLow)

sharpeRatio(avgReturn, stdDev)

sortinoRatio(avgReturn, downsideDev)

maxConsecutiveLosses(lossArray)

omegaRatio(totalWins, totalLosses)

latencySensitivity(latency)
版本注释
v3
display

Pine脚本库

本着真正的TradingView精神,作者将此Pine代码发布为开源脚本库,以便我们社区的其他Pine程序员可以重复使用它。向作者致敬!您可以私下或在其它开源出版物中使用此脚本库,但在出版物中重复使用此代码受网站规则约束。

免责声明