Custom Bar/Tool Colours controlled by Script Formulas

Author: Optuma Team Last updated: Feb 7, 2023 14:02


In addition to the standard colour options for bar and chandlestick charts, such as Close Position, Swing Relations or Strength, it is possible to add your own custom colour options using the powerful Optuma Scripting Language.

Here’s a video taken from our Intermediate Scripting Video Course showing how this can be done:

Custom Tool / Indicator Colours

As well as the price charts, it’s also possible to use script formulas to change the colour of tools and indicators, such as volume greater than the 20 day average:

Custom Colour Script 1

Creating your colour options

Custom Colour Script 2

To set a custom colour scheme right click on a bar or candle in the chart, from the Properties menu set the Colour Scheme to Custom. You can also left-click on a bar or candle and access the Properties menu from the Control Panel.

Custom Colour Script 3

After the Colour Scheme has been set to Custom you will then be able to access Custom Colour Scripts from the Properties menu.

Custom Colour Script 4

From here, you can select the default colour for bars that do not meet your set script conditions.

Custom Colour Script 5

You can then add a colour scheme script by clicking the + sign as highlighted in the image below.

Custom Colour Script 6

To select or create a script then click the script selection button, highlighted in the below image.

Custom Colour Script 7

This will then display the Script Editor where you can either select from the Saved Scripts or create a new script. For more information on using the Script Editor and for some scripting examples, please click here.

Custom Colour Script 8

After you have selected your script it will then be applied to the chart, you can then alter the colour scheme and also add further scripts if required. Selecting the Require All function will only apply the colour scheme to the chart if the conditions of each selected script are satisfied.

Custom Colour Script 9