From ffc281fcc2deadbb4689e279038b2f389269edff Mon Sep 17 00:00:00 2001 From: moshferatu Date: Wed, 21 Feb 2024 13:02:36 -0800 Subject: [PATCH] Round exit slippage calculation as well --- iron_condor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iron_condor.py b/iron_condor.py index 8429c17..9464e72 100644 --- a/iron_condor.py +++ b/iron_condor.py @@ -64,7 +64,7 @@ def monitor_spread_price(short_leg: OptionLeg, long_leg: OptionLeg, stop_price: exit_order = client.submit_option_order(short_leg_exit) logging.info('Short leg only exited.') - logging.info(f'Exit Slippage: {exit_order.fill_price - stop_price}') + logging.info(f'Exit Slippage: {round(exit_order.fill_price - stop_price, 3)}') # Unsubscribe from market data updates once the trade has exited. for leg in [short_leg, long_leg]: