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 อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน