Utility Scripts¶
Scripts across the platform for SSL management, debugging, Pine Script workflows, and auditing.
tradingview-strategy Scripts¶
Located in tradingview-strategy/scripts/.
issue-cert.sh -- Issue SSL Certificate¶
Issues a Let's Encrypt SSL certificate for ictedgefund.com using Certbot in Docker.
Prerequisites: DNS A record must point to the server's public IP before running.
What it does:
- Runs
certbot certonlyvia Docker Compose with webroot validation - Requests certificates for both
ictedgefund.comandwww.ictedgefund.com - Copies
fullchain.pemandprivkey.pemfrom the Certbot container tonginx/certs/ - Reloads the Nginx container to pick up the new certificate
Configuration: The email address defaults to admin@ictedgefund.com but can be overridden with the CERTBOT_EMAIL environment variable.
renew-cert.sh -- Renew SSL Certificate¶
Renews the existing Let's Encrypt certificate and reloads Nginx.
What it does:
- Runs
certbot renew --quietvia Docker Compose - Copies renewed certificates to
nginx/certs/ - Reloads Nginx
Cron setup (recommended):
This checks for renewal every Monday at 3:00 AM. Certbot only renews if the certificate is within 30 days of expiry.
read-bias-cells.js -- Debug Bias AI Table Cells¶
A diagnostic script that dumps the raw internal table cell primitives from the Bias AI indicator. Useful for verifying color mappings and cell structure.
What it does:
- Imports
evaluate()fromtradingview-mcp/src/connection.js - Executes JavaScript in the TradingView page context to access the Bias AI study's internal graphics collection
- Extracts each table cell's
row,col,text(t), background color (bc), and text color (tci) - Prints each cell with its ARGB background color in
0xhex format
Requires: TradingView Desktop running with CDP on port 9222 and a chart with Bias AI loaded.
Example output:
row: 0 col: 0 text: "PDH" bg: 0xff2196f3
row: 0 col: 1 text: "5892.50" bg: none
row: 1 col: 0 text: "PDL" bg: none
audit.py -- Indicator Audit Report¶
Python script that reads JSON audit data from stdin and produces a formatted report covering all 4 ICT indicators.
Report sections:
- Bias AI: Table presence, label count, line count
- Session Hunt AI: Signal labels with prices, extension lines (swept vs active), box/macro counts
- OB AI: ATR banner data (instrument, risk, stops, quantity), OB counts by direction and freshness, FVG count
- SMT Divergences: Label and line counts, detects missing labels when lines exist
Each section ends with an OK/ISSUE status flag.
tradingview-mcp Scripts¶
Located in tradingview-mcp/scripts/.
pine_pull.js -- Pull Pine Script Source¶
Downloads Pine Script source code from a TradingView indicator into a local file.
Connects via CDP and extracts the Pine Editor content for the currently selected indicator.
pine_push.js -- Push Pine Script Source¶
Uploads a local Pine Script file back to the TradingView Pine Editor.
Writes the file content into the Pine Editor and optionally triggers compilation.
launch_tv_debug.bat -- Launch TradingView (Windows)¶
Batch script that starts TradingView Desktop with CDP debugging enabled:
Run this once before using any MCP tools. A console window remains open while TradingView is running.
launch_tv_debug.vbs -- Launch TradingView (Windows, Silent)¶
VBScript wrapper that launches TradingView without a lingering console window:
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run """C:\Program Files\TradingView\TradingView.exe"" --remote-debugging-port=9222", 1, False
Preferred for automated workflows and startup scripts.
launch_tv_debug.sh -- Launch TradingView (Linux/macOS)¶
Shell script for non-Windows platforms:
The & backgrounds the process so the terminal is returned immediately.
ictedge-mcp Scripts¶
Located in ictedge-mcp/ root directory.
win-focus.vbs -- Window Focus (VBScript)¶
The primary window activation script used by the tv_focus_window tool. Uses VBScript's AppActivate to bring a window to the foreground by partial title match.
Called programmatically by focus-window.js via:
win-focus.ps1 -- Window Focus (PowerShell)¶
Legacy/reference alternative to the VBScript approach. Uses user32.dll P/Invoke (SetForegroundWindow, ShowWindow) for window activation. Not actively used by the MCP tool -- the VBScript approach was chosen for simplicity and reliability.