Round exit slippage calculation as well
This commit is contained in:
parent
b26c4068ac
commit
ffc281fcc2
@ -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)
|
exit_order = client.submit_option_order(short_leg_exit)
|
||||||
logging.info('Short leg only exited.')
|
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.
|
# Unsubscribe from market data updates once the trade has exited.
|
||||||
for leg in [short_leg, long_leg]:
|
for leg in [short_leg, long_leg]:
|
||||||
|
Loading…
Reference in New Issue
Block a user