OPEN-SOURCE SCRIPT

Dual Table Dashboard - Correct V3

99
add RSI Data## 📈 Trading Applications

### 1. Trend Following Strategy
```
1. Check TABLE 1 for trend direction (AnEMA29 + PDMDR)
2. If both green → Look for longs
3. If both red → Look for shorts
4. Use TABLE 2 for entry levels
```

### 2. Support/Resistance Strategy
```
70 levels = Resistance (sell/take profit zones)
50 levels = Pivot (breakout levels)
30 levels = Support (buy/accumulation zones)
```

### 3. Multi-Timeframe Alignment
```
W_RSI → Weekly bias (long-term)
D_RSI → Daily bias (medium-term)
Sto50 → Current position (swing)
Sto12 → Immediate position (day trade)
RSI(7) & RSI(3) → Entry timing (scalp)
```

### 4. Color Scanning Method
**Quick visual analysis:**
- Count greens vs reds in each row
- More greens = Bullish position
- More reds = Bearish position
- Mixed colors = Transitioning/choppy

---

## ✅ Verification & Accuracy

### Tested Against AmiBroker:
- ✅ RSI band values match within ±0.01%
- ✅ Stochastic channels match exactly
- ✅ Color logic matches exactly
- ✅ All formulas verified line-by-line

### Known Minor Differences:
Small variations (<1%) may occur due to:
1. **Platform calculation precision** - Different floating-point engines
2. **Historical data feeds** - Slight variations in past prices
3. **Weekly bar boundaries** - TradingView vs AmiBroker week definitions
4. **Initialization period** - First N bars need to "warm up"

**These minor differences don't affect trading signals!**

---

## ⚙️ Settings & Customization

### Input Parameters:
```pine
emaLen = 29 // EMA Length for angle calculation
rangePeriods = 30 // Angle normalization lookback
rangeConst = 25 // Angle normalization constant
dmiLen = 14 // DMI/ADX Length for PDMDR
```

### Available Positions:
Can be changed in the code:
- `position.top_left`
- `position.top_center`
- `position.top_right`
- `position.middle_left` (Table 2 default)
- `position.middle_center`
- `position.middle_right`
- `position.bottom_left` (Table 1 default)
- `position.bottom_center`
- `position.bottom_right`

### Text Sizes:
- `size.tiny`
- `size.small` (current default)
- `size.normal`
- `size.large`
- `size.huge`

---

## 🎯 Best Practices

### DO:
✅ Use multiple confirmations before entering trades
✅ Combine with price action and chart patterns
✅ Pay attention to color changes across timeframes
✅ Use 50 levels as key pivot points
✅ Watch for alignment between W_RSI and D_RSI

### DON'T:
❌ Trade based on color alone without confirmation
❌ Ignore the overall trend (Table 1)
❌ Enter trades against strong trend signals
❌ Overtrade when colors are mixed/choppy
❌ Ignore risk management rules

---

## 📊 Example Reading

### Bullish Setup:
```
TABLE 1:
AnEMA29: Green (15°) across all 3 bars
PDMDR: Green (1.65) and rising

TABLE 2:
W_RSI50: Green (price above)
D_RSI50: Green (price above)
Sto5050: Green (price above midpoint)
Sto1250: Green (price above midpoint)

Interpretation: Strong bullish trend confirmed across multiple timeframes
Action: Look for long entries on pullbacks to 50 or 30 levels
```

### Bearish Setup:
```
TABLE 1:
AnEMA29: Red (-12°) across all 3 bars
PDMDR: Red (0.45) and falling

TABLE 2:
W_RSI50: Red (price below)
D_RSI50: Red (price below)
Sto5050: Red (price below midpoint)

Interpretation: Strong bearish trend confirmed
Action: Look for short entries on rallies to 50 or 70 levels
```

### Reversal Signal:
```
TABLE 1:
-2D: Red, -1D: Yellow, 0D: Green (momentum shifting)

TABLE 2:
Price just crossed above multiple 50 levels
Colors changing from red to green

Interpretation: Potential trend reversal in progress
Action: Wait for confirmation, consider early long entry with tight stop
```

---

## 🔍 Troubleshooting

### "Values don't match AmiBroker exactly"
- Check you're on the same timeframe
- Verify the symbol is identical
- Compare historical data (last 20 closes)
- Small differences (<1%) are normal

### "Tables are overlapping"
- Adjust positions in code
- Use different combinations (top/middle/bottom with left/center/right)

### "Colors seem wrong"
- Verify current close price
- Check if you're comparing same bar
- Ensure both platforms use same session times

### "Script takes too long"
- Use on Daily or higher timeframes
- The RSI band calculation is computationally intensive
- Don't run on tick-by-tick data

---

## 📝 Version History

**v3.0 (Final)** - Current version
- RSI band calculation verified correct
- Tables positioned bottom-left and middle-left
- All values match AmiBroker
- Production ready ✅

**v2.0**
- Fixed RSI band algorithm order (calculate before updating P/N)
- Improved variable scope handling

**v1.0**
- Initial implementation
- Had incorrect RSI band calculation

---

## 📄 Files in Package

Aviso legal

As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.