Custom Bar Colours

Optuma Forums Optuma Scripting Custom Bar Colours

This topic contains 1 reply, has 2 voices, and was last updated by  Mohd 10 months, 2 weeks ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #40659
    Darren
    Darren
    • Topics: 28
    • Replies: 127
    • Posts: 155

    This has been copied from another thread, but here’s how to set custom bar colours as per the following rules:

    Green bars for when the body of candlestick is more than 50% of the range and a higher close:

    // get the range of the bar
    r1 = HIGH()-LOW();
    // get the absolute value of the body
    b1 = ABS(close()-OPEN());
    // is body > 50% of range?
    v1 = b1 / r1 > 0.5;
    //true and close is up
    v1 and CLOSE() IsUp

    Red bars when body > 50% of range and the close is lower:

    // get the range of the bar
    r1 = HIGH()-LOW();
    // get the absolute value of the body
    b1 = ABS(close()-OPEN());
    // is body > 50% of range?
    v1 = b1 / r1 > 0.5;
    //true and close is down
    v1 and CLOSE() IsDown

    When neither of the above is true set the All Scripts colour option to blue:

    Capture

    Capture

    #44079

    Mohd
    • Topics: 10
    • Replies: 12
    • Posts: 22

    Hi Darren,

    In point and figure chart i want to draw Moving Average of column  not price  how can i do that.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Pin It on Pinterest

Share This

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close