98507e3a47
Co-authored-by: Cursor <cursoragent@cursor.com>
2.8 KiB
2.8 KiB
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
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()
// Calculate required floating loss points based on re-entry count
int requiredLossPoints = MinFloatingLossPts * (currentReEntryCount + 1);
2. Fungsi CalculateReEntryLot()
// 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
- Kontrol Risiko: Maksimal 3 re-entry mencegah over-leveraging
- Jarak Bertahap: Semakin dalam floating loss, semakin besar jarak untuk re-entry berikutnya
- Lot Bertahap: Semakin banyak re-entry, semakin besar lot untuk recovery yang lebih cepat
- 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