Skip to content

OHLC Bar Coloring - Not based on Increasing / Decreasing Bars #217

@crossjbeer

Description

@crossjbeer

I am running a BackTest to simulate equity from a given trading strategy. We are using MPLFinance to plot the OHLC Bars of the stock we are trading. Our project requires OHLC Bars to be colored based on the trade taken at a given index. For example, if the strategy recommends a Buy order at market open, we would like the bar at market open to appear red.

After reading through the documentation, it seems there is substantial support for custom colors on the plots. This customization happens primarily through the make_markretcolors function. However, it seems the bars are always colored according to whether they are increasing or decreasing. I have been so far unable to pinpoint the segment of code I should amend to or modify to change this behavior.

Thank you for any help you can provide, and have a great day.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions