Skip to content

Control the bar color #470

Closed
Closed

Description

@poeticlinuxer

In China,if the stock 's Open Price =High Price =Low Price =Close Price ,How can I control the bar color ?
I want to draw red when the percentage change in the Close Price is positive .
I want to draw green when the percentage change in the Close Price is negative .
How can I do ?

Activity

  1. poeticlinuxer commented on Nov 16, 2021

    @poeticlinuxer
    Author
  2. DanielGoldfarb commented on Nov 16, 2021

    @DanielGoldfarb
    Collaborator

    There is an enhancement in progress to be able to set the color of individual candles. However due to other work also in progress it may be another month or two before that enhancement is complete and released to production.

    In the meantime, there is a work-around posted here: #378 (comment)

    Let me know if that helps.

  3. poeticlinuxer commented on Dec 8, 2021

    @poeticlinuxer
    Author
    mc = mpf.make_marketcolors(
        up='red', 
        down='green', 
    )
    
    s = mpf.make_mpf_style(
        y_on_right=True,
        mavcolors=['#696969',
                   '#DA70D6',
                   '#4682B4',
                   '#8B4500'
                   ],
        marketcolors=mc,
        rc={'font.family': 'SimHei'}
    )

    I use another way to do it .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions