Add entry slippage to call and put spread details before insertion into the trades table
This commit is contained in:
parent
df932568b4
commit
0f12e6932c
@ -162,7 +162,8 @@ def _enter_iron_condor(entry_time: datetime):
|
||||
{'Action': 'SELL', 'Strike': short_call_strike, 'Type': 'CALL'},
|
||||
{'Action': 'BUY', 'Strike': long_call_strike, 'Type': 'CALL'}
|
||||
],
|
||||
'Open': call_spread_fill
|
||||
'Open': call_spread_fill,
|
||||
'Entry Slippage': (call_spread_fill - call_spread_mid)
|
||||
}
|
||||
|
||||
put_spread_details = {
|
||||
@ -170,7 +171,8 @@ def _enter_iron_condor(entry_time: datetime):
|
||||
{'Action': 'SELL', 'Strike': short_put_strike, 'Type': 'PUT'},
|
||||
{'Action': 'BUY', 'Strike': long_put_strike, 'Type': 'PUT'}
|
||||
],
|
||||
'Open': put_spread_fill
|
||||
'Open': put_spread_fill,
|
||||
'Entry Slippage': (put_spread_fill - put_spread_mid)
|
||||
}
|
||||
|
||||
upsert(pd.DataFrame([{
|
||||
|
Loading…
Reference in New Issue
Block a user