OPEN-SOURCE SCRIPT
Bot Analyzer

📌 Script Name: Bot Analyzer
This TradingView Pine Script v5 indicator creates a dashboard table on the chart that helps you analyze any asset for running a martingale grid bot on futures.
🔧 User Inputs
TP % (tpPct): Take Profit percentage.
SO step % (soStepPct): Step size between safety orders.
SO n (soCount): Number of safety orders.
M mult (martMult): Martingale multiplier (how much each next order increases in size).
Lev (leverage): Leverage used in futures.
BB len / BB mult: Bollinger Bands settings for measuring channel width.
ATR len: ATR period for volatility.
HV days: Lookback window (days) for Historical Volatility calculation.
📐 Calculations
ATR % (atrPct): Normalized ATR relative to price.
Bollinger Band width % (bbPct): Market channel width as percentage of basis.
Historical Volatility (hvAnn): Annualized volatility, calculated from daily log returns.
Dynamic Step % (dynStepPct): Step size for safety orders, automatically adjusted from ATR and clamped between 0.3% and 5%.
Covered Move % (coveredPct): Total percentage move the bot can withstand before last safety order.
Martingale Size Factor (sizeFactor): Total position size multiplier after all safety orders, based on martingale multiplier.
Risk Score (riskLabel): Simple risk estimate:
Low if risk < 30
Mid if risk < 60
High if risk ≥ 60
📊 Output (Table on Chart)
At the top-right of the chart, the script draws a table with 9 rows:
Metric Value
BB % Bollinger Band width in %
HV % Historical Volatility (annualized %)
TP % Take profit setting
SO step % Safety order step size
SO n Number of safety orders
M mult Martingale multiplier
Dyn step % Dynamic step based on ATR
Size x Total position size factor (e.g., 4.5x)
Risk Risk label (Low / Mid / High)
⚙️ Use Case
Helps choose coins for a martingale bot:
If BB% is wide and HV% is high → the asset is volatile enough.
If Risk shows "High" → parameters are aggressive, you may need to adjust step size, SO count, or leverage.
The dashboard lets you compare assets quickly without switching between multiple indicators.
This TradingView Pine Script v5 indicator creates a dashboard table on the chart that helps you analyze any asset for running a martingale grid bot on futures.
🔧 User Inputs
TP % (tpPct): Take Profit percentage.
SO step % (soStepPct): Step size between safety orders.
SO n (soCount): Number of safety orders.
M mult (martMult): Martingale multiplier (how much each next order increases in size).
Lev (leverage): Leverage used in futures.
BB len / BB mult: Bollinger Bands settings for measuring channel width.
ATR len: ATR period for volatility.
HV days: Lookback window (days) for Historical Volatility calculation.
📐 Calculations
ATR % (atrPct): Normalized ATR relative to price.
Bollinger Band width % (bbPct): Market channel width as percentage of basis.
Historical Volatility (hvAnn): Annualized volatility, calculated from daily log returns.
Dynamic Step % (dynStepPct): Step size for safety orders, automatically adjusted from ATR and clamped between 0.3% and 5%.
Covered Move % (coveredPct): Total percentage move the bot can withstand before last safety order.
Martingale Size Factor (sizeFactor): Total position size multiplier after all safety orders, based on martingale multiplier.
Risk Score (riskLabel): Simple risk estimate:
Low if risk < 30
Mid if risk < 60
High if risk ≥ 60
📊 Output (Table on Chart)
At the top-right of the chart, the script draws a table with 9 rows:
Metric Value
BB % Bollinger Band width in %
HV % Historical Volatility (annualized %)
TP % Take profit setting
SO step % Safety order step size
SO n Number of safety orders
M mult Martingale multiplier
Dyn step % Dynamic step based on ATR
Size x Total position size factor (e.g., 4.5x)
Risk Risk label (Low / Mid / High)
⚙️ Use Case
Helps choose coins for a martingale bot:
If BB% is wide and HV% is high → the asset is volatile enough.
If Risk shows "High" → parameters are aggressive, you may need to adjust step size, SO count, or leverage.
The dashboard lets you compare assets quickly without switching between multiple indicators.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。