I was trying to make a candlestick graph, but it’s acting up. I also have an EWMA graph on the same figure and I think it’s confused by it.
I wanted to just display the normal - open, close, high, low by the cursor and date on the bottom. And it does that sometimes, but other times it displays the dates for some reason.
I tried changing hoverinfo to just y, but it completely messes up and doesn’t even show EWMA then.
Edit: I think i kind of partially figured it out … it still doesn’t display all 5 values, just the EWMA for some reason sometimes. Is there a way to delete your post btw?
def interactive_graph(stock):
trace1 = go.Candlestick(x= MU.data.index,
open=MU.data['Open'],
high=MU.data['High'],
low=MU.data['Low'],
close=MU.data['Close'],
hoverinfo = 'y'
increasing=dict(line=dict(width = 3)),
decreasing=dict(line=dict(width = 3)))
trace2 = go.Scatter(
x= MU.data.index,
y= t.predicted,
marker={'color': 'blue', 'symbol': 42, 'size': "10"},
mode='lines+markers+text',
name='EWMA',
hoverinfo = 'x+y'
)
layout = go.Layout(
autosize=True,
title='Interactive chart',
xaxis=dict(
rangeslider = dict(visible = False),
),
yaxis=dict(
title='Price ($)',
)
)
fig = go.Figure(data=[trace1, trace2], layout = layout)
iplot(fig)
interactive_graph(MU)