Commit Graph

7 Commits

Author SHA1 Message Date
3779e7c499 Fix: Remove duplicate code in moving_average.js
The file had duplicate calculate() and getMetadata() methods causing syntax errors.
Removed duplicate code from lines 214-251.
Now the file has a single proper implementation.
2026-03-01 19:46:41 +01:00
71bc034590 Fix: Missing closing brace in MAIndicator.calculate() 2026-03-01 19:45:56 +01:00
33f49b1559 Fix MA rendering and simplify signal UI
- Fixed MA plot ID to match return structure (ma vs value)
- Moved Status and Last Signal display to main Indicator Analysis section
- Removed Signal Status section from expanded indicator config
- Simplified signal display to show only status icon/type and last signal date
- Removed strength and reasoning tooltips from signal display
2026-03-01 19:45:28 +01:00
a344a7f0da Refactor: Convert indicators to self-contained files
- Created moving_average.js consolidating ma.js, ma_indicator.js, sma.js, ema.js
- Made all indicators self-contained with embedded:
  * Math logic (no external dependencies)
  * Metadata (getMetadata())
  * Signal calculation (calculateXXXSignal)
  * Base class (inline BaseIndicator)
- Updated macd.js, hts.js to inline EMA/MA calculations
- Added signal functions to RSI, BB, Stochastic, ATR indicators
- Updated indicators/index.js to export both classes and signal functions
- Simplified signals-calculator.js to orchestrate using indicator signal functions
- Removed obsolete files: ma.js, base.js, ma_indicator.js, sma.js, ema.js

All indicators now fully self-contained with no external file dependencies
for math, signal calculation, or base class.
2026-03-01 19:39:28 +01:00
e457ce3e20 feat: Implement HTS (Higher Timeframe Trend System) strategy
- Add HTS strategy engine with crossover and alignment-based entries
- Implement Auto HTS feature (computes on TF/4 from 1m data)
- Add 1H Red Zone filter to validate long signals
- Add channel-based stop loss with RTL functionality
- Enhanced visualization with 30% opacity channel lines
- Fixed data alignment in simulation (uses htsData instead of mismatched indices)
- Fixed syntax errors in hts-engine.js (malformed template literals)
- Fixed duplicate code in simulation.js
- Added showSimulationMarkers to window object for global access
- Enhanced logging for trade signals and simulation results
- Fix missing prevFastHigh/currFastHigh in hts-visualizer.js
- Disable trend zone overlays to prevent chart clutter
- Implement client-side visualization for trade markers using line series
- MA strategy indicator configuration fixed (was empty during engine run)
- Made entry conditions more permissive for shorter timeframes
- Added comprehensive error handling and console logging
2026-02-27 09:30:43 +01:00
7539830524 Add configurable RSI levels and remove line settings for RSI
RSI Changes:
- Add overbought and oversold level inputs (default 70/30)
- Update calculate() to return overboughtBand and oversoldBand instead of hardcoded bands
- Update plots to use overboughtBand and oversoldBand with fixed style='dashed' and width=1
- This makes RSI bands adjustable while keeping line style and width fixed

Configuration Panel:
- Hide Line Type and Line Width settings for RSI (indicator.type === 'rsi')
- RSI bands always dashed at 1px width as standard
- Overbought and oversold levels now appear as configurable parameters
2026-02-25 23:26:46 +01:00
c7ee5135ae Initial commit - BTC Trading Dashboard
- FastAPI backend with PostgreSQL database connection
- Frontend dashboard with lightweight-charts
- Technical indicators (SMA, EMA, RSI, MACD, Bollinger Bands, etc.)
- Trading strategy simulation and backtesting
- Database connection to NAS at 20.20.20.20:5433
- Development server setup and documentation
2026-02-25 22:10:30 +01:00