Skip to content

Instantly share code, notes, and snippets.

View madeye-matt's full-sized avatar

Matt Innes madeye-matt

  • Madeye Software Ltd.
  • Bristol, UK
View GitHub Profile
@madeye-matt
madeye-matt / candlesticks-v4.py
Created January 11, 2020 14:25
A candlestick chart with moving average, volumes and Bollinger bars using plotly v4 syntax
import pandas_datareader.data as web
from datetime import datetime
import numpy as np
import plotly.graph_objects as go
INCREASING_COLOR = '#17BECF'
DECREASING_COLOR = '#7F7F7F'
def movingaverage(interval, window_size=10):
import pandas_datareader.data as web
from datetime import datetime
import numpy as np
import pandas as pd
import chart_studio.plotly as py
df = web.DataReader("gs", 'yahoo', datetime(2008, 1, 1), datetime(2008, 12, 28))
df.head()