Rename slippage calculation method
This commit is contained in:
parent
61811a97a9
commit
03ef60b303
@ -2,7 +2,7 @@ import datetime
|
|||||||
|
|
||||||
from database.trades import trades
|
from database.trades import trades
|
||||||
|
|
||||||
def average_entry_slippage(date: datetime):
|
def average_slippage(date: datetime):
|
||||||
trade_records = trades(date)
|
trade_records = trades(date)
|
||||||
|
|
||||||
slippages = []
|
slippages = []
|
||||||
@ -20,7 +20,7 @@ def average_entry_slippage(date: datetime):
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
target_date = datetime.date(2024, 2, 23)
|
target_date = datetime.date(2024, 2, 23)
|
||||||
|
|
||||||
average_slippage = average_entry_slippage(target_date)
|
average_slippage = average_slippage(target_date)
|
||||||
|
|
||||||
if average_slippage is not None:
|
if average_slippage is not None:
|
||||||
print(f"{target_date} Average Entry Slippage: {average_slippage}")
|
print(f"{target_date} Average Entry Slippage: {average_slippage}")
|
||||||
|
Loading…
Reference in New Issue
Block a user