Custom Bar Colours

Optuma Forums Optuma Scripting Custom Bar Colours

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #40659
    Darren
    Darren
    • Topics: 13
    • Replies: 51
    • Posts: 64

    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: 8
    • Replies: 10
    • Posts: 18

    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