I can’t use Plotly Express because I need this trace to be added to a Candlestick plot with several financial indicators.
Why doesn’t this work? Did I miss something obvious?
import plotly.graph_objects as go
import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv')
df.set_index('Date')
#print(df['Date'].tail())
#print(df.tail())
longEntryTimes = df['Date'].sample(10)
print(longEntryTimes)
under = 0.95
longEntries = [ under * df.loc[df['Date'] == d]['AAPL.Low'] for d in longEntryTimes]
print(longEntries)
fig = go.Figure()
# Should graph 10 triangle markers?
fig.add_trace(go.Scatter(x=longEntryTimes,
y=longEntries,
mode="markers",
marker=dict(
symbol="triangle-up",
size=15,
color="DarkGreen",
),showlegend=False))
fig.show()