Coloring the plot of a tool

Optuma Forums Optuma Scripting Coloring the plot of a tool

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #66049
    Louis
    • Topics: 17
    • Replies: 21
    • Posts: 38

    Hi,

    I have chart with 5 breadth tools added. They are all the same script, just looking through different sector lists. Please see attached workbook. I want to color the line plot to be red when it is below 50 and black when it is above 50. I went to the tool’s properties and tried a custom color scheme with a script, but can’t figure it out what to reference in the script. I tried referencing the script itself with a script(x) > 50. I tried referencing close() > 50. When writing the script for the color custom scheme of the individual tool, what script do I use to color the line plot of the indicator?

    Thank you,
    Louis

    #66053
    Matthew
    • Topics: 5
    • Replies: 435
    • Posts: 440

    Hi,

    In the script setting the rules for colour you need to use a GETDATA() function to reference the breadth codes value, then set the rules around that.

    Here’s an example using a custom breadth code on my own system:

    If I were to use Close() the parent charts data is referenced, that’s why the GETDATA() is required.

    Ex1

    #66055
    Louis
    • Topics: 17
    • Replies: 21
    • Posts: 38

    Hi Matthew. GetData on a breadth code. Worked like a charm! Thank you so much!!!

    Please take a look at the two pictures below, specifically the footers. The top picture is a screenshot from Optuma itself, and bottom is the footer when I send the chart to an image file – JPEG. What am I doing wrong that the footer changes when I send the chart to an image file? Thank you.

    12

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Pin It on Pinterest