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.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.