Files
XauBot/tests/test_risk_settings.py
T
GifariKemal 0d25548ed5 refactor: restructure repository and add README, CLAUDE.md, LICENSE
- Move utility scripts to scripts/ (check_market, check_positions, etc.)
- Move test files to tests/ (test_modules, test_mt5_connection, etc.)
- Move deprecated dashboards to archive/
- Move research files to docs/research/
- Add sys.path fix to all moved Python files
- Rewrite README.md with architecture diagram and badges
- Add CLAUDE.md project guide
- Add MIT LICENSE
- Update .gitignore with archive/ pattern

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 13:22:46 +07:00

21 lines
668 B
Python

"""Test new risk settings."""
# Run from project root: python tests/test_risk_settings.py
import sys, os
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from src.smart_risk_manager import create_smart_risk_manager
# Test dengan modal $50
print('=' * 50)
print('PENGATURAN RISK MANAGEMENT BARU')
print('=' * 50)
manager = create_smart_risk_manager(50)
print()
print('Dengan modal $50:')
print(f' Daily Loss Limit (5%): ${manager.max_daily_loss_usd:.2f}')
print(f' Total Loss Limit (10%): ${manager.max_total_loss_usd:.2f}')
print(f' S/L Per Trade (1%): ${manager.max_loss_per_trade:.2f}')
print()
print(manager.get_risk_summary())