Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feature Request: New style called binance-dark #614

Open
Labels
enhancementNew feature or request
@juanmad

Description

I would like to suggest the addition of a new style for the mplfinance library. The addition of this feature will improve the plot styles since there isn't a good dark style plot yet and will provide a better user experience.

I have copied the binance dark theme color scheme and code it, so I would like to propose a new style called binance_dark or somethink similar in addition to the binance style. Nevetheless, the style could be definitely be improved even more yet I would like to make the first step.

Additional context
Here is an example code snippet that demonstrates how this feature can be implemented:

binance_dark = {
 "base_mpl_style": "dark_background",
 "marketcolors": {
 "candle": {"up": "#3dc985", "down": "#ef4f60"}, 
 "edge": {"up": "#3dc985", "down": "#ef4f60"}, 
 "wick": {"up": "#3dc985", "down": "#ef4f60"}, 
 "ohlc": {"up": "green", "down": "red"},
 "volume": {"up": "#247252", "down": "#82333f"}, 
 "vcedge": {"up": "green", "down": "red"}, 
 "vcdopcod": False,
 "alpha": 1,
 },
 "mavcolors": ("#ad7739", "#a63ab2", "#62b8ba"),
 "facecolor": "#1b1f24",
 "gridcolor": "#2c2e31",
 "gridstyle": "--",
 "y_on_right": True,
 "rc": {
 "axes.grid": True,
 "axes.grid.axis": "y",
 "axes.edgecolor": "#474d56",
 "axes.titlecolor": "red",
 "figure.facecolor": "#161a1e",
 "figure.titlesize": "x-large",
 "figure.titleweight": "semibold",
 },
 "base_mpf_style": "binance-dark",
}
can = pd.read_csv("data1.csv", parse_dates=True, index_col=0)
# Plot the candlestick chart
mpf.plot(
 can,
 type="candle",
 style=binance_dark,
 title="BTCUSDT",
 ylabel="Price ($)",
 ylabel_lower="Volume",
 volume=True,
 mav=(2, 4, 6),
 update_width_config=dict(candle_linewidth=0.5, candle_width=0.5),
)

Here is a preview of how the style of the plot looks like

output

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /