cleanup plot scripts
This commit is contained in:
parent
aa7aeb046e
commit
6f80aff3e2
@ -2,24 +2,15 @@
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
import logging
|
import logging
|
||||||
import argparse
|
|
||||||
import os
|
|
||||||
|
|
||||||
from pandas import DataFrame
|
|
||||||
import talib.abstract as ta
|
|
||||||
|
|
||||||
import plotly
|
|
||||||
from plotly import tools
|
from plotly import tools
|
||||||
from plotly.offline import plot
|
from plotly.offline import plot
|
||||||
import plotly.graph_objs as go
|
import plotly.graph_objs as go
|
||||||
|
|
||||||
import freqtrade.vendor.qtpylib.indicators as qtpylib
|
|
||||||
from freqtrade import exchange, analyze
|
from freqtrade import exchange, analyze
|
||||||
from freqtrade.misc import common_args_parser
|
|
||||||
from freqtrade.strategy.strategy import Strategy
|
from freqtrade.strategy.strategy import Strategy
|
||||||
import freqtrade.misc as misc
|
import freqtrade.misc as misc
|
||||||
import freqtrade.optimize as optimize
|
import freqtrade.optimize as optimize
|
||||||
import freqtrade.analyze as analyze
|
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@ -61,7 +52,6 @@ def plot_analyzed_dataframe(args) -> None:
|
|||||||
dataframe = dataframes[pair]
|
dataframe = dataframes[pair]
|
||||||
dataframe = analyze.populate_buy_trend(dataframe)
|
dataframe = analyze.populate_buy_trend(dataframe)
|
||||||
dataframe = analyze.populate_sell_trend(dataframe)
|
dataframe = analyze.populate_sell_trend(dataframe)
|
||||||
dates = misc.datesarray_to_datetimearray(dataframe['date'])
|
|
||||||
|
|
||||||
if (len(dataframe.index) > 750):
|
if (len(dataframe.index) > 750):
|
||||||
logger.warn('Ticker contained more than 750 candles, clipping.')
|
logger.warn('Ticker contained more than 750 candles, clipping.')
|
||||||
@ -119,25 +109,17 @@ def plot_analyzed_dataframe(args) -> None:
|
|||||||
fillcolor="rgba(0,176,246,0.2)",
|
fillcolor="rgba(0,176,246,0.2)",
|
||||||
line={'color': "transparent"},
|
line={'color': "transparent"},
|
||||||
)
|
)
|
||||||
|
macd = go.Scattergl(x=df['date'], y=df['macd'], name='MACD')
|
||||||
|
macdsignal = go.Scattergl(x=df['date'], y=df['macdsignal'], name='MACD signal')
|
||||||
|
volume = go.Bar(x=df['date'], y=df['volume'], name='Volume')
|
||||||
|
|
||||||
macd = go.Scattergl(
|
fig = tools.make_subplots(
|
||||||
x=df['date'],
|
rows=3,
|
||||||
y=df['macd'],
|
cols=1,
|
||||||
name='MACD'
|
shared_xaxes=True,
|
||||||
|
row_width=[1, 1, 4],
|
||||||
|
vertical_spacing=0.0001,
|
||||||
)
|
)
|
||||||
macdsignal = go.Scattergl(
|
|
||||||
x=df['date'],
|
|
||||||
y=df['macdsignal'],
|
|
||||||
name='MACD signal'
|
|
||||||
)
|
|
||||||
|
|
||||||
volume = go.Bar(
|
|
||||||
x=df['date'],
|
|
||||||
y=df['volume'],
|
|
||||||
name='Volume'
|
|
||||||
)
|
|
||||||
|
|
||||||
fig = tools.make_subplots(rows=3, cols=1, shared_xaxes=True, row_width=[1, 1, 4],vertical_spacing=0.0001)
|
|
||||||
|
|
||||||
fig.append_trace(candles, 1, 1)
|
fig.append_trace(candles, 1, 1)
|
||||||
fig.append_trace(bb_lower, 1, 1)
|
fig.append_trace(bb_lower, 1, 1)
|
||||||
|
@ -4,14 +4,12 @@ import sys
|
|||||||
import json
|
import json
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
import plotly
|
|
||||||
from plotly import tools
|
from plotly import tools
|
||||||
from plotly.offline import plot
|
from plotly.offline import plot
|
||||||
import plotly.graph_objs as go
|
import plotly.graph_objs as go
|
||||||
|
|
||||||
import freqtrade.optimize as optimize
|
import freqtrade.optimize as optimize
|
||||||
import freqtrade.misc as misc
|
import freqtrade.misc as misc
|
||||||
import freqtrade.exchange as exchange
|
|
||||||
from freqtrade.strategy.strategy import Strategy
|
from freqtrade.strategy.strategy import Strategy
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user