Files
Place-Order-Trading-Bot/update_lot_size.py
T
cbazzaandClaude Sonnet 4.5 9e0452ca8c feat: Increase lot size from 0.01 to 0.05
Changes:
- Min Lot: 0.01 → 0.05 (5x increase)
- Max Lot: 0.10 → 0.20 (2x increase)

Impact:
- Higher profit potential per trade
- More aggressive position sizing
- Risk still controlled by percentage

Cell 25 updated with new volume = 0.05

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-13 09:30:11 +01:00

77 lines
2.3 KiB
Python

#!/usr/bin/env python3
"""
Update Lot Size Configuration
Changes min_lot from 0.01 to 0.05 and max_lot to 0.20
"""
import json
notebook_path = "TradingBot_V1.6_Adaptive_Complete_CORRECTED.ipynb"
print("=" * 70)
print("🔧 UPDATING LOT SIZE CONFIGURATION")
print("=" * 70)
print()
# Load notebook
with open(notebook_path, 'r', encoding='utf-8') as f:
notebook = json.load(f)
changes_made = 0
# Search and replace in all code cells
for i, cell in enumerate(notebook['cells']):
if cell['cell_type'] == 'code':
source = ''.join(cell['source'])
original_source = source
# Replace common lot size patterns
replacements = [
('volume = 0.01', 'volume = 0.05'),
('lot_size = 0.01', 'lot_size = 0.05'),
('min_lot = 0.01', 'min_lot = 0.05'),
('min_lot_size = 0.01', 'min_lot_size = 0.05'),
('max_lot = 0.1', 'max_lot = 0.2'),
('max_lot = 0.10', 'max_lot = 0.20'),
('max_lot_size = 0.1', 'max_lot_size = 0.2'),
('max_lot_size = 0.10', 'max_lot_size = 0.20'),
]
for old, new in replacements:
if old in source:
source = source.replace(old, new)
print(f"Cell {i}: {old}{new}")
changes_made += 1
# Update cell if changed
if source != original_source:
cell['source'] = source.split('\n')
print()
if changes_made > 0:
# Save notebook
print(f"💾 Saving notebook with {changes_made} changes...")
with open(notebook_path, 'w', encoding='utf-8') as f:
json.dump(notebook, f, indent=1, ensure_ascii=False)
print("✅ Notebook updated successfully!")
print()
print("📋 Changes made:")
print(" - Min Lot: 0.01 → 0.05")
print(" - Max Lot: 0.10 → 0.20")
print()
print("⚠️ WICHTIG:")
print(" 1. Lade dein Notebook neu (Kernel → Restart)")
print(" 2. Führe alle Cells neu aus")
print(" 3. Die neuen Lot-Größen werden ab dem nächsten Trade aktiv")
else:
print("❌ Keine Lot Size Parameter gefunden!")
print()
print("Die Lot-Größe wird wahrscheinlich dynamisch berechnet.")
print("Suche nach 'calculate_position_size' oder ähnlichen Funktionen")
print("im Notebook und ändere dort die Parameter manuell.")
print()
print("=" * 70)