Skip to main content
This guide will get you from installation to a running VibeTrader instance in just a few minutes.
Make sure you’ve completed the Installation steps before continuing.

Starting the Development Server

1

Navigate to the project directory

Open your terminal and navigate to the VibeTrader directory:
cd vibetrader
2

Start the dev server

Run the Vite development server:
npm run dev
You should see output similar to:
VITE v7.2.2  ready in 423 ms

  Local:   http://localhost:5173/vibetrader/
  Network: use --host to expose
  press h + enter to show help
3

Open in browser

Open your browser and navigate to:
http://localhost:5173/vibetrader/
You should see the VibeTrader interface load with a default chart!
The development server includes Hot Module Replacement (HMR), so changes to your code will be reflected instantly without a full page reload.

Your First Chart

When VibeTrader loads, you’ll see:
  1. Main Chart Area - Candlestick chart with OHLCV data
  2. Volume Panel - Trading volume histogram below the main chart
  3. Control Bar - Symbol selector, timeframe selector, and drawing tools
  4. Axes - X-axis (time) and Y-axis (price)

Selecting a Symbol

1

Click the symbol selector

Click on the current symbol (e.g., “BTCUSDT”) in the top toolbar
2

Search for a symbol

Type a symbol name to search:
  • For crypto: ETHUSDT, BNBUSDT, SOLUSDT
  • For stocks: AAPL, GOOGL, MSFT (if using Yahoo Finance)
3

Select from results

Click on a symbol from the search results to load its data

Changing Timeframes

1

Click the timeframe selector

Click on the current timeframe (e.g., “1h”) in the toolbar
2

Choose a timeframe

Select from available options:
  • 1m - 1 minute (for scalping)
  • 5m - 5 minutes
  • 15m - 15 minutes
  • 1h - 1 hour (default)
  • 4h - 4 hours
  • 1d - Daily
  • 1w - Weekly
The platform will automatically fetch historical data for the selected symbol and timeframe.

Basic Navigation

Mouse Controls

Master these essential mouse controls:
┌─────────────────────────────────────────┐
│ Drag                  → Move chart      │
│ Ctrl + Drag           → Scale Y-axis    │
│ Mouse Wheel           → Move chart      │
│ Shift + Wheel         → Zoom in/out     │
│ Double click (chart)  → Reference cursor│
│ Double click (Y-axis) → Remove cursor   │
└─────────────────────────────────────────┘

Moving the Chart

// Implementation in src/lib/charting/view/ChartView.tsx
onMouseMove(e) {
  if (isDragging) {
    // Move chart horizontally
    xc.moveChart(deltaMouse.dx);
  }
}

Zooming

// Zoom with Shift + Mouse Wheel
onWheel(e) {
  if (e.shiftKey) {
    // Zoom in/out
    xc.zoom(e.deltaY);
  } else {
    // Move chart
    xc.move(e.deltaY);
  }
}

Keyboard Shortcuts

Speed up your workflow with keyboard shortcuts:
← →        Move chart left/right
↑ ↓        Zoom in/out
Ctrl + ←→  Move reference cursor
Space      Toggle fast/normal speed
ESC        Hide crosshair/cursor
Press Space to toggle between fast and normal movement speed for quicker chart navigation.

Drawing Tools

VibeTrader includes powerful technical analysis drawing tools.

Drawing a Trendline

1

Select the Line tool

Click the Line icon in the drawing toolbar
2

Click the starting point

Click on the chart where you want the line to start
3

Click the ending point

Click where you want the line to endThe trendline is now complete!

Drawing Fibonacci Retracement

1

Select Fibonacci tool

Click the Fibonacci Retracement icon
2

Click the swing low

Click at the bottom of a price movement
3

Click the swing high

Click at the top of the price movementFibonacci levels (0%, 23.6%, 38.2%, 50%, 61.8%, 100%) will be displayed
All drawing tools support handles for adjustment after creation. Click and drag handles to modify drawings.

Available Drawing Tools

ToolDescriptionUse Case
LineSimple trendlineSupport/resistance levels
Fibonacci RetracementHorizontal levelsPotential reversal zones
Fibonacci Time ZoneVertical time-based levelsTime-based analysis
Gann AnglesGeometric price/time anglesPrice and time correlation
Parallel ChannelTwo parallel trendlinesChannel trading
PolylineMulti-segment lineComplex patterns
See src/lib/charting/drawing/ for implementation details.

Adding Indicators

VibeTrader supports custom indicators via PineScript integration.

Adding a Built-in Indicator

1

Open indicator menu

Click the indicator button in the toolbar
2

Select an indicator

Choose from available indicators (SMA, EMA, RSI, MACD, etc.)
3

Configure parameters

Adjust indicator parameters like period, color, and line style

Using PineScript

Create custom indicators with PineScript:
import { PineTS } from 'pinets';

// Example: Simple Moving Average
const scriptCode = `
//@version=5
indicator("My SMA", overlay=true)
length = input.int(20, "Length")
sma_value = ta.sma(close, length)
plot(sma_value, color=color.blue, linewidth=2)
`;

// Compile and execute
const indicator = await PineTS.compile(scriptCode);
const outputs = await indicator.execute({
  open: openArray,
  high: highArray,
  low: lowArray,
  close: closeArray,
  volume: volumeArray
});
PineScript indicators can be overlaid on the main chart or displayed in separate panes.

Data Sources

VibeTrader can fetch data from multiple sources.

Configuring Data Source

In src/Env.ts, set your preferred data source:
import { Source } from './lib/domain/DataFecther';

export const source = Source.binance;  // or Source.yfinance

Binance (Crypto)

Default source for cryptocurrency data:
import { fetchData, Source } from './lib/domain/DataFecther';

await fetchData(
  Source.binance,
  baseSer,
  'BTCUSDT',
  tframe,
  'UTC'
);
Binance integration uses the pinets Provider.Binance for market data.

Yahoo Finance (Stocks)

For stock market data:
await fetchData(
  Source.yfinance,
  baseSer,
  'AAPL',
  tframe,
  'America/New_York'
);

Local Data

Load custom data from JSON:
// klines.json
[
  {
    "Date": "2024-01-01T00:00:00Z",
    "Open": 42000,
    "High": 42500,
    "Low": 41800,
    "Close": 42300,
    "Volume": 1234.56
  }
]
Place in public/klines.json and the platform will load it automatically if remote sources fail.

Taking Screenshots

Capture your analysis for sharing:
1

Position your chart

Navigate to the view you want to capture
2

Click screenshot button

Click the camera/screenshot icon in the toolbar
3

Save the image

The screenshot will be downloaded as a PNG file
Screenshots are powered by html2canvas and capture the entire chart area including drawings and indicators.
// Implementation in src/lib/charting/pane/Screenshot.tsx
import html2canvas from 'html2canvas';

const captureScreenshot = async () => {
  const canvas = await html2canvas(chartElement);
  const dataUrl = canvas.toDataURL('image/png');
  downloadImage(dataUrl, 'vibetrader-chart.png');
};

Building for Production

When you’re ready to deploy:
1

Build the application

npm run build
This creates an optimized production build in the dist/ directory
2

Preview the build

npm run preview
Test the production build locally at http://localhost:4173/vibetrader/
3

Deploy

Deploy the dist/ directory to your hosting service:
  • GitHub Pages
  • Netlify
  • Vercel
  • Any static hosting
Remember to update the base path in vite.config.ts if deploying to a different path than /vibetrader/.

Common Tasks

Customizing Colors

Colors are defined in src/lib/Colors.ts:
export const Colors = {
  positive: '#26a69a',  // Green for bullish candles
  negative: '#ef5350',  // Red for bearish candles
  grid: '#e0e0e0',      // Grid lines
  // ... more colors
};

Adjusting Chart Appearance

Modify chart dimensions in component props:
<ChartView
  name="Main Chart"
  width={1200}
  height={600}
  xc={xControl}
  tvar={klineVar}
  updateEvent={updateEvent}
/>

Changing Default Timeframe

Set in src/lib/charting/view/KlineViewContainer.tsx:
const tframe = TFrame.fromShortName('1h');  // Default to 1 hour

Next Steps

Now that you’re up and running, explore more advanced features:

Chart Controls

Master advanced chart manipulation and controls

Drawing Tools

Learn all drawing tools and techniques

Architecture

Understand the platform’s architecture

Custom Indicators

Build your own technical indicators

Troubleshooting

Chart Not Loading

Issue: Blank screen or chart doesn’t appear Solution:
  1. Check browser console for errors (F12)
  2. Verify data source is accessible
  3. Try a different symbol or timeframe

Data Fetch Errors

Issue: “Failed to fetch data” error Solution:
// Check network connectivity
// Verify API endpoints are accessible
// Try switching data sources in src/Env.ts
export const source = Source.yfinance;  // Try alternative source

Drawing Tools Not Working

Issue: Can’t create drawings Solution:
  1. Ensure a drawing tool is selected from the toolbar
  2. Click completely (don’t drag) to place points
  3. For variable-handle drawings, Ctrl+Click to complete
For more help, check the User Guide or visit the GitHub repository to report issues.

Summary

You’ve learned how to:
  • ✅ Start the development server
  • ✅ Navigate charts with mouse and keyboard
  • ✅ Select symbols and timeframes
  • ✅ Use drawing tools for technical analysis
  • ✅ Add indicators with PineScript
  • ✅ Capture screenshots
  • ✅ Build for production

Continue Learning

Dive deeper into VibeTrader’s features in the User Guide

Build docs developers (and LLMs) love