Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
shilewenuw authored May 1, 2020
1 parent 5d71f14 commit 7b864d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ print(logger.get_positions())
# example of how to use clear_all_positions(),
# replace get_price() with a real api call or any other price getter
def get_price(security, dt):
return len(security) + dt.timetuple().tm_yday
fake_api_method = lambda security, dt: len(security) + dt.timetuple().tm_yday
get_price = lambda security, dt: fake_api_method(security, dt)
logger.clear_all_positions(get_price, datetime.today())
# shows the statistics in a graphs in a pop up window. since it calls plt.show()
Expand Down

0 comments on commit 7b864d9

Please sign in to comment.