Reorganize UI for external trading workflow with manual trade logging
- Restructure tabs to analysis-focused workflow: * Analysis Hub: AI analysis, risk management, manual trade logger * Daily Prep: Market summary, alerts, checklist, news, trading plan * Journal & Review: Trading journal, habit tracker, advanced analytics * Live Charts: Technical analysis with streaming charts - Add ManualTradeLogger component for logging trades from MT5/TradingView/cTrader - Remove execution-focused components (TradeControls, PortfolioTracker) - Update XAU/USD price to realistic ,084.99 - Add indicator preferences and AI plan service - Add comprehensive documentation on decision coverage and implementation
This commit is contained in:
@@ -0,0 +1,147 @@
|
||||
# Quick Start: Indicator Preferences & AI Plan Generation
|
||||
|
||||
## 🚀 Get Started in 3 Steps
|
||||
|
||||
### Step 1: Run Database Migration (One-time setup)
|
||||
|
||||
```bash
|
||||
cd backend
|
||||
python migrate_indicator_ai_tables.py
|
||||
```
|
||||
|
||||
**Expected output:**
|
||||
```
|
||||
🔄 Starting database migration...
|
||||
📊 Database URL: postgresql://...
|
||||
📝 Creating new tables...
|
||||
✅ Created table: user_indicator_preferences
|
||||
✅ Created table: ai_plan_generations
|
||||
✨ Migration completed successfully!
|
||||
```
|
||||
|
||||
### Step 2: Set Your Indicator Preferences
|
||||
|
||||
1. Open the app: `http://localhost:3000`
|
||||
2. Click **Settings** tab
|
||||
3. Scroll to **Indicator Preferences**
|
||||
4. Click indicators you want to use (e.g., RSI, MACD, EMA)
|
||||
5. Set priority levels (1-10) - higher = more important
|
||||
6. Click **Save**
|
||||
|
||||
**Recommended for beginners:**
|
||||
- RSI (Priority: 8)
|
||||
- MACD (Priority: 7)
|
||||
- EMA (Priority: 6)
|
||||
- Support/Resistance (Priority: 9)
|
||||
|
||||
### Step 3: Generate Your First AI Plan
|
||||
|
||||
1. Go to **Daily Helper** or any tab with Trading Plan
|
||||
2. Click the **AI Plan** button (purple with sparkle ✨)
|
||||
3. Confirm when prompted
|
||||
4. Wait 5-15 seconds for AI to generate
|
||||
5. Review the plan
|
||||
6. Edit if needed
|
||||
7. Click **Save**
|
||||
|
||||
---
|
||||
|
||||
## 🎯 What You Get
|
||||
|
||||
### AI-Generated Plan Includes:
|
||||
- ✅ **Market Bias**: BULLISH/BEARISH/NEUTRAL
|
||||
- ✅ **Confidence Level**: 0-100%
|
||||
- ✅ **Entry Zone**: Min/Max prices to enter
|
||||
- ✅ **Target Price**: Where to take profit
|
||||
- ✅ **Stop Loss**: Where to cut losses
|
||||
- ✅ **Support Levels**: 3-5 key support prices
|
||||
- ✅ **Resistance Levels**: 3-5 key resistance prices
|
||||
- ✅ **Max Trades**: Recommended trade limit
|
||||
- ✅ **Strategy Notes**: AI's reasoning and what to watch
|
||||
|
||||
---
|
||||
|
||||
## 💡 Tips for Best Results
|
||||
|
||||
### Choose the Right Indicators
|
||||
- **Trend Following**: Use SMA, EMA, MACD
|
||||
- **Momentum**: Use RSI, Stochastic
|
||||
- **Volatility**: Use Bollinger Bands, ATR
|
||||
- **Support/Resistance**: Use Pivot Points, Fibonacci
|
||||
|
||||
### Set Priorities Wisely
|
||||
- Your most trusted indicator: Priority 9-10
|
||||
- Secondary indicators: Priority 5-8
|
||||
- Experimental indicators: Priority 1-4
|
||||
|
||||
### Review AI Plans
|
||||
- AI is powerful but not perfect
|
||||
- Always review the plan before trading
|
||||
- Adjust based on your experience
|
||||
- Submit feedback to improve future plans
|
||||
|
||||
---
|
||||
|
||||
## 🔧 Configuration
|
||||
|
||||
### Backend (.env file)
|
||||
```env
|
||||
# Required for AI features
|
||||
OPENROUTER_API_KEY=your_key_here
|
||||
OPENROUTER_MODEL=anthropic/claude-3.5-sonnet
|
||||
|
||||
# Database
|
||||
DATABASE_URL=postgresql://user:pass@localhost:5432/dbname
|
||||
```
|
||||
|
||||
### Frontend (automatic)
|
||||
All settings are stored in the database and loaded automatically.
|
||||
|
||||
---
|
||||
|
||||
## 📊 Example Workflow
|
||||
|
||||
### Morning Routine:
|
||||
1. ✅ Check economic calendar
|
||||
2. ✅ Review overnight news
|
||||
3. ✅ **Generate AI Plan** ← New!
|
||||
4. ✅ Set price alerts
|
||||
5. ✅ Start trading
|
||||
|
||||
### Evening Review:
|
||||
1. ✅ Log trades
|
||||
2. ✅ Review plan accuracy
|
||||
3. ✅ Submit feedback on AI plan
|
||||
4. ✅ Adjust indicator preferences if needed
|
||||
|
||||
---
|
||||
|
||||
## ❓ FAQ
|
||||
|
||||
**Q: Do I need to set indicator preferences?**
|
||||
A: No, but AI will use standard analysis without your preferences.
|
||||
|
||||
**Q: How often should I generate AI plans?**
|
||||
A: Generate a new plan each trading day.
|
||||
|
||||
**Q: Can I edit AI-generated plans?**
|
||||
A: Yes! Always review and adjust based on your expertise.
|
||||
|
||||
**Q: What if AI generation fails?**
|
||||
A: You can always create a manual plan using "New Plan" button.
|
||||
|
||||
**Q: Do indicator preferences affect the chart?**
|
||||
A: No, they only affect AI plan generation.
|
||||
|
||||
---
|
||||
|
||||
## 🆘 Need Help?
|
||||
|
||||
- Check `INDICATOR_AI_PLAN_IMPLEMENTATION.md` for full documentation
|
||||
- Review backend logs for API errors
|
||||
- Check browser console for frontend errors
|
||||
- Verify database migration completed successfully
|
||||
|
||||
---
|
||||
|
||||
**Ready to trade smarter with AI! 🚀**
|
||||
Reference in New Issue
Block a user