mirror of
https://github.com/chrisnov-it/quantumbotx.git
synced 2026-07-28 03:07:53 +00:00
3.9 KiB
3.9 KiB
Holiday Integration System
Overview
The QuantumBotX platform includes an automatic holiday detection system that seamlessly activates culturally-appropriate trading modes for both Christian and Muslim traders. This system automatically adjusts trading parameters, UI themes, and risk management settings based on calendar dates.
Features
Automatic Activation
- Christmas Mode: Automatically activates from December 20th through January 6th
- Ramadan Mode: Automatically activates during the Islamic holy month of Ramadan
- New Year Mode: Automatically activates around New Year's Day
- Eid al-Fitr Mode: Automatically activates during the Eid al-Fitr celebration
Dynamic UI Visibility
- Conditional Navigation: Holiday-specific pages (like Ramadan) only appear in navigation when active
- Dashboard Widgets: Holiday-specific widgets appear automatically on the main dashboard
- Thematic Elements: Visual themes and effects activate based on the current holiday
Ramadan Trading Mode
When Ramadan is detected, the system automatically applies:
-
Trading Pauses:
- Sahur: 03:30-05:00 WIB
- Iftar: 18:00-19:30 WIB
- Tarawih: 20:00-21:30 WIB
-
Risk Adjustments:
- 20% risk reduction during fasting hours
- Reduced position sizing
- Conservative trade execution
-
UI Enhancements:
- Islamic green and gold color scheme
- Crescent moon decorations
- Iftar countdown timer
- Patience reminders
-
Special Features:
- Zakat calculator
- Charity tracker
- Optimal trading hours guidance
- Patience-focused trading advice
Christmas Trading Mode
When Christmas is detected, the system automatically applies:
-
Trading Pauses:
- December 24th (Christmas Eve)
- December 25th (Christmas Day)
- December 26th (Boxing Day)
- December 31st (New Year's Eve)
- January 1st (New Year's Day)
-
Risk Adjustments:
- 50% risk reduction during the holiday period
- 30% reduction in lot sizes
- Maximum of 3 trades per day
-
UI Enhancements:
- Christmas red and green color scheme
- Snow effect animation
- Christmas countdown timer
Implementation Details
Backend Components
-
Holiday Manager (
core/seasonal/holiday_manager.py):- Detects active holidays based on current date
- Provides holiday-specific configurations
- Calculates prayer times for Ramadan
- Manages trading adjustments
-
API Endpoints:
/api/holiday/status- Get current holiday status/api/holiday/pause-status- Check if trading is paused/api/ramadan/features- Get Ramadan-specific features
Frontend Integration
-
Base Template (
templates/base.html):- Global holiday detection script
- Dynamic CSS theme application
- Holiday banner display
- Conditional navigation visibility
-
Dashboard (
templates/index.html):- Holiday-specific widgets
- Iftar countdown timer (Ramadan)
- Christmas countdown timer
- Risk adjustment indicators
- Patience reminders (Ramadan)
-
Holiday Pages:
- Dedicated Ramadan page (only visible when active)
- Informational content about automatic activation
Benefits
- Cultural Sensitivity: Automatically respects religious observances
- Risk Management: Reduces trading activity during distracted periods
- User Experience: Seamless integration without manual configuration
- Inclusivity: Supports both Christian and Muslim trading traditions
- Automation: No user intervention required for activation
- Clean Interface: Holiday-specific navigation only appears when relevant
Technical Notes
- Holiday dates are estimated for Ramadan due to the lunar calendar
- Production implementations should use proper Islamic calendar libraries
- UI themes are applied dynamically through CSS variables
- Trading pauses are checked in real-time during bot execution
- Navigation elements are conditionally displayed based on holiday status