feat: enhance trade tracking with fees, PnL, and refined logging (v1.7.3)
- Implement real-time fee and realized PnL tracking using get_executions. - Rename 'side' column to 'trade' in CSV log and dashboard (Enter/Exit labels). - Add automatic CSV header migration (side -> trade). - Enhance dashboard with session PnL (USD/BTC), total fees, and used leverage. - Improve signal detection with candle-internal crossover logic. - Add robust retry mechanism with failure window tracking. - Sync exchange leverage automatically based on direction. - Update config with robustness and mode-specific leverage settings.
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
# Ping-Pong Strategy Configuration
|
||||
|
||||
# Trading Pair & Timeframe
|
||||
symbol: BTCUSDT
|
||||
symbol: BTCUSD
|
||||
interval: "1" # Minutes (1, 3, 5, 15, 30, 60, 120, 240, 360, 720, D, W, M)
|
||||
|
||||
# Indicator Settings
|
||||
@ -9,25 +9,36 @@ rsi:
|
||||
period: 14
|
||||
overbought: 70
|
||||
oversold: 30
|
||||
TF: 1 # same as symbol's interval
|
||||
enabled_for_open: true
|
||||
enabled_for_close: true
|
||||
|
||||
|
||||
hurst:
|
||||
period: 30
|
||||
multiplier: 1.8
|
||||
TF: 1 # same as symbol's interval
|
||||
enabled_for_open: true
|
||||
enabled_for_close: true
|
||||
|
||||
# Strategy Settings
|
||||
direction: "long" # "long" or "short"
|
||||
capital: 1000.0 # Initial capital for calculations (informational)
|
||||
exchange_leverage: 3.0 # Multiplier for each 'ping' size
|
||||
max_effective_leverage: 1.0 # Cap on total position size relative to equity
|
||||
leverage_long: 10.0 # Leverage for LONG mode
|
||||
leverage_short: 5.0 # Leverage for SHORT mode
|
||||
max_effective_leverage: 2.5 # Cap on total position size relative to equity
|
||||
pos_size_margin: 20.0 # Margin per 'ping' (USD)
|
||||
take_profit_pct: 1.5 # Target profit percentage per exit (1.5 = 1.5%)
|
||||
#take_profit_pct: 1.5 # Target profit percentage per exit (1.5 = 1.5%)
|
||||
partial_exit_pct: 0.15 # 15% of position closed on each TP hit
|
||||
min_position_value_usd: 15.0 # Minimum remaining value to keep position open
|
||||
|
||||
# Execution Settings
|
||||
loop_interval_seconds: 10 # How often to check for new data
|
||||
loop_interval_seconds: 5 # How often to check for new data
|
||||
debug_mode: false
|
||||
|
||||
# Robustness Settings
|
||||
robustness:
|
||||
enabled: true
|
||||
max_retries: 3
|
||||
retry_window_seconds: 300 # 5 minutes
|
||||
autostart_on_reboot: true
|
||||
|
||||
Reference in New Issue
Block a user