Skip to content

Commit

Permalink
Merge pull request #457 from Lumiwealth/updated-discord-charts
Browse files Browse the repository at this point in the history
more month information in discord charts
  • Loading branch information
grzesir authored May 23, 2024
2 parents 84e5d83 + 00f4ee9 commit 88d0b9e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lumibot/data_sources/tradier_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,8 @@ def get_last_price(self, asset, quote=None, exchange=None):
asset.right,
asset.strike,
)
elif asset.asset_type == "index":
symbol = f"I:{asset.symbol}"
else:
symbol = asset.symbol

Expand Down
2 changes: 1 addition & 1 deletion lumibot/strategies/strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3925,7 +3925,7 @@ def send_spark_chart_to_discord(self, stats_df, portfolio_value, now, days=180):
def custom_date_formatter(x, pos):
try:
date = mdates.num2date(x)
if pos == 0: # First tick
if pos % 2 == 0: # Every second tick
return date.strftime("%d\n%b\n%Y")
else: # Other ticks
return date.strftime("%d")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="lumibot",
version="3.4.1",
version="3.4.2",
author="Robert Grzesik",
author_email="[email protected]",
description="Backtesting and Trading Library, Made by Lumiwealth",
Expand Down

0 comments on commit 88d0b9e

Please sign in to comment.