Coloring the plot of a tool

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

forOptuma.owb (35.6 KB)

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:

GETDATA(CODE=ADRATIO:Market Breadth) > 10

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

Ex1

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