fixed TZ
This commit is contained in:
@ -1452,8 +1452,8 @@ class TradingExecutor:
|
||||
# Calculate position size in USD
|
||||
position_size_usd = position.quantity * position.entry_price
|
||||
|
||||
# Calculate gross PnL (before fees) with leverage
|
||||
gross_pnl = (current_price - position.entry_price) * position.quantity * leverage
|
||||
# Calculate gross PnL (before fees) with leverage - SHORT profits when price falls
|
||||
gross_pnl = (position.entry_price - current_price) * position.quantity * leverage
|
||||
|
||||
# Calculate net PnL (after fees)
|
||||
net_pnl = gross_pnl - simulated_fees
|
||||
@ -1543,8 +1543,8 @@ class TradingExecutor:
|
||||
# Calculate position size in USD
|
||||
position_size_usd = position.quantity * position.entry_price
|
||||
|
||||
# Calculate gross PnL (before fees) with leverage
|
||||
gross_pnl = (current_price - position.entry_price) * position.quantity * leverage
|
||||
# Calculate gross PnL (before fees) with leverage - SHORT profits when price falls
|
||||
gross_pnl = (position.entry_price - current_price) * position.quantity * leverage
|
||||
|
||||
# Calculate net PnL (after fees)
|
||||
net_pnl = gross_pnl - fees
|
||||
@ -1630,7 +1630,7 @@ class TradingExecutor:
|
||||
# Calculate position size in USD
|
||||
position_size_usd = position.quantity * position.entry_price
|
||||
|
||||
# Calculate gross PnL (before fees) with leverage
|
||||
# Calculate gross PnL (before fees) with leverage - LONG profits when price rises
|
||||
gross_pnl = (current_price - position.entry_price) * position.quantity * leverage
|
||||
|
||||
# Calculate net PnL (after fees)
|
||||
|
Reference in New Issue
Block a user