Add entry and exit slippage to option spread strategies so that they can ultimately be configured by the client
This commit is contained in:
parent
37c3ebe1fa
commit
50269972ae
@ -17,7 +17,9 @@ def create_strategies(credit_target: float, entry_time: str, number_of_contracts
|
||||
number_of_contracts = number_of_contracts,
|
||||
spread_width = 50,
|
||||
stop_loss_multiple = 1.00,
|
||||
trade_entry_time = entry_time
|
||||
trade_entry_time = entry_time,
|
||||
entry_slippage = 0.10,
|
||||
exit_slippage = 0.20
|
||||
)
|
||||
put_spread_strategy = CreditTargetStrategy(
|
||||
credit_target = credit_target,
|
||||
@ -25,6 +27,8 @@ def create_strategies(credit_target: float, entry_time: str, number_of_contracts
|
||||
number_of_contracts = number_of_contracts,
|
||||
spread_width = 50,
|
||||
stop_loss_multiple = 1.00,
|
||||
trade_entry_time = entry_time
|
||||
trade_entry_time = entry_time,
|
||||
entry_slippage = 0.10,
|
||||
exit_slippage = 0.20
|
||||
)
|
||||
return call_spread_strategy, put_spread_strategy
|
@ -17,7 +17,9 @@ def create_strategies(delta_target: float, entry_time: str, number_of_contracts:
|
||||
number_of_contracts = number_of_contracts,
|
||||
spread_width = 50,
|
||||
stop_loss_multiple = 1.00,
|
||||
trade_entry_time = entry_time
|
||||
trade_entry_time = entry_time,
|
||||
entry_slippage = 0.10,
|
||||
exit_slippage = 0.20
|
||||
)
|
||||
put_spread_strategy = DeltaTargetStrategy(
|
||||
delta_target = -delta_target,
|
||||
@ -25,6 +27,8 @@ def create_strategies(delta_target: float, entry_time: str, number_of_contracts:
|
||||
number_of_contracts = number_of_contracts,
|
||||
spread_width = 50,
|
||||
stop_loss_multiple = 1.00,
|
||||
trade_entry_time = entry_time
|
||||
trade_entry_time = entry_time,
|
||||
entry_slippage = 0.10,
|
||||
exit_slippage = 0.20
|
||||
)
|
||||
return call_spread_strategy, put_spread_strategy
|
@ -9,3 +9,5 @@ class OptionSpreadStrategy:
|
||||
spread_width: int
|
||||
stop_loss_multiple: float
|
||||
trade_entry_time: str
|
||||
entry_slippage: float
|
||||
exit_slippage: float
|
Loading…
Reference in New Issue
Block a user