Skip to content

Instantly share code, notes, and snippets.

@sshh12
Created March 21, 2026 00:45
Show Gist options
  • Select an option

  • Save sshh12/f7b338eae0585829245b44b2523ec514 to your computer and use it in GitHub Desktop.

Select an option

Save sshh12/f7b338eae0585829245b44b2523ec514 to your computer and use it in GitHub Desktop.
Vibe Short Index (VSI)
// Vibe Short Index (VSI)
// CRM — Salesforce: enterprise CRM, the original cloud SaaS giant
// TEAM — Atlassian: Jira and Confluence, dev project management and wikis
// HUBS — HubSpot: lightweight CRM, marketing and sales automation for SMBs
// MNDY — monday.com: visual work management boards and project tracking
// ASAN — Asana: task and project management for teams
// Equal-weighted, indexed to 100 on 2026-03-20.
// Base prices are hard-coded so the index plots across all history.
// To re-base to a different date, update the prices in Settings > Inputs.
//
// Setup in TradingView:
// 1. Open any chart (symbol doesn't matter — data comes from request.security)
// 2. Open Pine Editor (bottom panel, "Pine Editor" tab)
// 3. Delete the default script, paste this entire file
// 4. Click "Add to chart"
// 5. The VSI line appears in a separate pane below the main chart
// 6. To adjust base prices: click the gear icon on the indicator > Inputs
//@version=6
indicator("Vibe Short Index", shorttitle="VSI", overlay=false)
// --- Base-date closing prices (2026-03-20) ---
// Hard-coded so the index is computable for every bar, including history.
// Adjust in Settings > Inputs if you want to re-base to a different date.
CRM_base = input.float(195.38, "CRM base price")
TEAM_base = input.float(73.73, "TEAM base price")
HUBS_base = input.float(258.81, "HUBS base price")
MNDY_base = input.float(73.85, "MNDY base price")
ASAN_base = input.float(6.65, "ASAN base price")
// --- Request daily closes for each component ---
CRM_close = request.security("CRM", "D", close)
TEAM_close = request.security("TEAM", "D", close)
HUBS_close = request.security("HUBS", "D", close)
MNDY_close = request.security("MNDY", "D", close)
ASAN_close = request.security("ASAN", "D", close)
// --- Normalise each stock to its base price ---
CRM_norm = CRM_close / CRM_base
TEAM_norm = TEAM_close / TEAM_base
HUBS_norm = HUBS_close / HUBS_base
MNDY_norm = MNDY_close / MNDY_base
ASAN_norm = ASAN_close / ASAN_base
// --- Equal-weighted index (average of normalised returns × 100) ---
indexValue = (CRM_norm + TEAM_norm + HUBS_norm + MNDY_norm + ASAN_norm) / 5 * 100
// --- Plot ---
plot(indexValue, title="VSI", color=color.new(color.orange, 0), linewidth=2)
hline(100, "Base (100)", color=color.gray, linestyle=hline.style_dashed)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment