Files
EA2/smart-bot/REENTRY_TOPOLOGY_UPDATE.md
T
2026-05-24 20:22:43 +07:00

87 lines
2.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Re-Entry Topology Update
## Overview
Topologi re-entry telah diperbarui untuk menggunakan sistem bertahap (progressive) dengan maksimal 3 kali re-entry dan jarak floating loss yang bertahap.
## Perubahan Utama
### 1. Maksimal Re-Entry
- **Sebelum**: Tidak ada batasan maksimal
- **Sekarang**: Maksimal 3 kali re-entry per arah (BUY/SELL)
- **Parameter**: `MaxReEntries = 3`
### 2. Jarak Floating Loss Bertahap
- **Re-entry 1**: `MinFloatingLossPts` (misal: 200 poin)
- **Re-entry 2**: `MinFloatingLossPts * 2` (misal: 400 poin)
- **Re-entry 3**: `MinFloatingLossPts * 3` (misal: 600 poin)
### 3. Lot Multiplier Bertahap
- **Re-entry 1**: `ReEntryLotMultiplier^1` (misal: 1.5)
- **Re-entry 2**: `ReEntryLotMultiplier^2` (misal: 2.25)
- **Re-entry 3**: `ReEntryLotMultiplier^3` (misal: 3.375)
## Parameter Input
```mql5
input int MaxReEntries = 3; // Maximum Re-Entries per direction
input double ReEntryLotMultiplier = 1.5; // Lot multiplier for re-entries
input int MinFloatingLossPts = 50; // Minimum floating loss points for re-entry
```
## Contoh Perhitungan
### Dengan MinFloatingLossPts = 200 dan ReEntryLotMultiplier = 1.5:
#### Jarak Floating Loss:
- **Re-entry 1**: 200 poin
- **Re-entry 2**: 400 poin
- **Re-entry 3**: 600 poin
#### Lot Size (dengan base lot 0.1):
- **Re-entry 1**: 0.1 × 1.5 = 0.15 lot
- **Re-entry 2**: 0.1 × 2.25 = 0.225 lot
- **Re-entry 3**: 0.1 × 3.375 = 0.3375 lot
## Logika Implementasi
### 1. Fungsi HasFloatingLossPositions()
```mql5
// Calculate required floating loss points based on re-entry count
int requiredLossPoints = MinFloatingLossPts * (currentReEntryCount + 1);
```
### 2. Fungsi CalculateReEntryLot()
```mql5
// Calculate progressive lot multiplier
double progressiveMultiplier = MathPow(ReEntryLotMultiplier, currentReEntryCount + 1);
double reEntryLot = baseLot * progressiveMultiplier;
```
### 3. Dashboard Display
Dashboard sekarang menampilkan:
- Jumlah re-entry saat ini (BUY/SELL)
- Jarak floating loss yang diperlukan untuk re-entry berikutnya
- Format: `Re-Entry: BUY(1/3) SELL(0/3) | Next: BUY=400pts SELL=200pts`
## Keuntungan Sistem Baru
1. **Kontrol Risiko**: Maksimal 3 re-entry mencegah over-leveraging
2. **Jarak Bertahap**: Semakin dalam floating loss, semakin besar jarak untuk re-entry berikutnya
3. **Lot Bertahap**: Semakin banyak re-entry, semakin besar lot untuk recovery yang lebih cepat
4. **Transparansi**: Dashboard menampilkan informasi yang jelas tentang status re-entry
## Reset Kondisi
Re-entry counter akan di-reset ketika:
- Semua posisi dalam arah tersebut ditutup
- Sinyal baru muncul di arah yang berlawanan
## Monitoring
Sistem akan mencatat log detail untuk setiap re-entry:
- Jarak floating loss yang diperlukan
- Lot size yang digunakan
- Jumlah re-entry saat ini
- Alasan re-entry atau penolakan