Generate institutional-grade Streamlit trading dashboards with interactive Plotly charts. Use when a user asks to: (1) visualize a trading strategy or backtest results, (2) build a quant dashboard or trading dashboard, (3) create candlestick charts with trade entry/exit markers, (4) visualize Fair Value Gaps (FVG), Smart Money Concepts (BOS, CHoCH), or any technical indicator overlays, (5) scaffold a Streamlit app for financial data, (6) see equity curves, drawdown plots, or performance stats for a strategy. Triggers on phrases like: build me a dashboard, visualize my strategy, quant dashboard, trading visualization, show my backtest, candlestick chart, FVG chart, equity curve, Streamlit trading app.
Scaffold a complete, runnable Streamlit trading dashboard customized to the user's strategy.
A quant-dashboard/ directory containing a fully working Streamlit app:
quant-dashboard/
├── app.py # Entry point — streamlit run app.py
├── data/
│ └── loader.py # Data fetching (yfinance / CSV)
├── charts/
│ ├── candlestick.py # Plotly candlestick + overlays
│ ├── equity_curve.py # Portfolio equity over time
│ ├── drawdown.py # Underwater equity plot
│ └── trade_markers.py # Entry/exit arrows on chart
├── indicators/
│ ├── fvg.py # Fair Value Gap detection
│ ├── structure.py # BOS / CHoCH detection
│ └── custom.py # Placeholder for user indicators
├── stats/
│ └── performance.py # Sharpe, PF, win rate, max DD, etc.
└── requirements.txt
If the user already described their strategy in conversation, don't re-ask — extract from context.
Copy the template from assets/template/ into the user's working directory as quant-dashboard/. Then customize:
app.py — Set default ticker, timeframe, and sidebar controls matching user's strategy.indicators/ — Keep only the modules the user needs. Add custom indicator logic if described.charts/candlestick.py — Wire up the correct overlays (FVG rectangles, trade arrows, bands, etc.).stats/performance.py — Always include. No customization needed.data/loader.py — Switch between yfinance or CSV based on user's data source.See references/customization-guide.md for detailed instructions on adapting each module.
cd quant-dashboard
pip install -r requirements.txt
streamlit run app.py
Report the local URL (typically http://localhost:8501) to the user.
User will request changes ("add Bollinger Bands", "change colors", "add RSI panel"). Edit only the affected module — never regenerate the full scaffold.
st.set_page_config(layout="wide") with custom dark CSS in app.py.Every indicator module in indicators/ must export a function with this signature:
def detect(df: pd.DataFrame, **params) -> pd.DataFrame:
"""
Input: OHLCV DataFrame with columns: Open, High, Low, Close, Volume
Output: Same DataFrame with added columns for the indicator
"""
For overlay indicators (FVG rectangles, S/R zones), also export:
def get_shapes(df: pd.DataFrame, **params) -> list[dict]:
"""Return list of Plotly shape dicts for add_shape()."""
references/customization-guide.md — Detailed guide for adapting each module to different strategiesreferences/indicator-recipes.md — Code patterns for common indicators (FVG, BOS, CHoCH, BB, VWAP, RSI, MACD)