Skip to content

feat: VWAPBB Trading Strategy for XAUUSD – Full Stack Application#1

Open
devin-ai-integration[bot] wants to merge 1 commit into
masterfrom
devin/1779860137-vwapbb-xauusd
Open

feat: VWAPBB Trading Strategy for XAUUSD – Full Stack Application#1
devin-ai-integration[bot] wants to merge 1 commit into
masterfrom
devin/1779860137-vwapbb-xauusd

Conversation

@devin-ai-integration
Copy link
Copy Markdown

Summary

Full-stack VWAPBB trading strategy application for XAUUSD on the 5-minute timeframe.

Backend (Python/FastAPI):

  • Technical indicators: Bollinger Bands (20, 2σ), VWAP (daily reset), EMA 200 (15m timeframe)
  • Trend filter: EMA 200 on 15m determines bullish/bearish → filters buy-only or sell-only signals
  • Engulfing pattern detection (bullish + bearish)
  • Buy signals: 2 scenarios per the strategy spec (above/below VWAP with BB/VWAP touches)
  • Sell signals: bearish engulfing near VWAP or Upper BB when below EMA 200
  • Simulated XAUUSD OHLCV data with realistic gold price movements

Frontend (React/TypeScript/Vite):

  • Interactive candlestick chart (TradingView Lightweight Charts v5)
  • Indicator overlays: Bollinger Bands (blue), VWAP (orange), EMA 200 15m (purple dashed)
  • Buy/sell signal markers on chart (green up arrows / red down arrows)
  • Signal panel with trade scenario details and reasoning
  • Stats bar: current price, change, VWAP, signal counts
  • Dark theme, responsive layout
  • Configurable candle count (100/200/500/1000)

Dashboard Screenshot

Review & Testing Checklist for Human

  • Start backend: cd backend && python3 -m venv venv && source venv/bin/activate && pip install -r requirements.txt && python main.py → verify API at http://localhost:8000/docs
  • Start frontend: cd frontend && npm install && npm run dev → verify dashboard at http://localhost:5173
  • Verify all indicators render correctly on the chart (BB bands, VWAP line, EMA 200 dashed line)
  • Verify buy/sell signal arrows appear on the chart at correct candle positions
  • Test different candle counts (100, 200, 500, 1000) via the dropdown

Notes

  • Uses simulated XAUUSD data for demonstration. To connect live data, replace data_provider.py with a real market data API (MetaTrader, OANDA, etc.).
  • Proximity threshold (NEAR_THRESHOLD in strategy.py) is 0.15%, tuned for XAUUSD volatility.
  • EMA 200 is computed on 15-minute candles by resampling 5-minute data per the strategy specification.
  • See VWAPBB_README.md for full setup instructions.

Link to Devin session: https://app.devin.ai/sessions/83642ac492674913bedb0df88472f4a1
Requested by: @Order2ceo

Backend (Python/FastAPI):
- Bollinger Bands, EMA 200 (15m), VWAP indicators
- Bullish/bearish engulfing pattern detection
- Buy/sell signal generation with trend filtering
- Simulated XAUUSD data with realistic price movements

Frontend (React/TypeScript/Vite):
- Interactive TradingView-style candlestick chart
- Real-time indicator overlays (BB, VWAP, EMA 200)
- Buy/sell signal markers on chart
- Signal panel with trade details
- Stats bar with price, VWAP, and signal counts
- Dark theme, responsive design

Co-Authored-By: Y9 JA <order2ceo@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@devin-ai-integration
Copy link
Copy Markdown
Author

End-to-End Test Results

Tested the VWAPBB Strategy app via browser UI with both servers running locally.

Test Results (4/4 passed)
Test Result
Dashboard loads with correct data at 500 candles PASSED
Switching to 100 candles changes trend BULLISH→BEARISH and signals 5→0 PASSED
Refresh button reloads data PASSED
1000 candles renders large dataset without errors PASSED
Evidence Screenshots

500 Candles — BULLISH Trend (Default)

500 candles dashboard

  • Price: $2660.16, VWAP: $2654.64, Buy: 4, Sell: 1, Trend: BULLISH
  • Chart renders with BB (blue), VWAP (orange), EMA 200 (purple dashed), signal markers

100 Candles — BEARISH Trend (Trend Filter Proof)

100 candles bearish

  • Price: $2628.92, Trend: BEARISH, Signals: 0, Rules: "Only SELL signals active"
  • Proves trend filter works: different data windows → different trends

1000 Candles — Large Dataset

1000 candles

  • Price: $2689.27, Buy: 1, Sell: 4, Signals: 5
  • Renders full 1000-candle dataset with SELL markers visible

Devin session

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant