The Show Bar tool can be used to highlight bars on a chart with either an arrow, vertical line, number, symbol, or text label that satisfies user-defined criteria created in the Scripting Language. For example, you can highlight bars where moving averages have crossed over, or the price is higher than a moving average (see below for formula examples).
For more on using the Optuma Scripting Language sign in to our free video courses.
The above example shows where the day's volume is higher than a 20-day average volume, and the close is higher:
VOL() > MA(VOL(), BARS=20) and CLOSE() IsUp
To add a Show Bar to your chart, select the tool from the Price tool group, and click on the chart to add the tool. Click on the Condition property to open the Script Editor window to enter the required formula.
Optuma will then highlight the bars on your chart where the criteria has been met.
Displaying NumbersThe Show Bar can be set to show
numbers above the bar with adjustable decimal settings. For example, you
could use the following script to show the high value of the bar where a
V1 = PIVOT(MIN=10) > 0;
IF(V1 == 1,High(),0)
With the Show Bar set to display Numbers the output would look as follows:
The ability to adjust the decimals of the label will appear in the Show Bar properties after the Display type is set to Numbers.
Text Labels and Symbols
The Show Bar indicator can be setup to display custom text labels, symbols and Astro symbols. These display options can be accessed via the properties panel.
Example of Custom Text Labels being used with the Show Bar:
Example of Symbols being used with the Show Bar:
Example of Astro Symbols being used with the Show Bar (note: multiple astro symbols can be added):
Actions & Properties
Add to Toolbar: Click this action to add the selected tool to your custom toolbar.
Apply Settings to All: When multiple Show Bar tools have been applied to a chart, page or workbook, this action can be used to apply the settings of the one selected to other instances of the tool. This is a great time saver if an adjustment is made to the tool - such as hiding or adding levels- as this allows all the other Show Bar tools in the chart, page or entire workbook to be updated instantly.
Copy Tool: Allows you to copy the selected tool, which can then be pasted onto a different chart window.
Move to Back: If the tool is displaying in front of other tools or indicators clicking this action will move the lines to the background.
Move to Front: If the tool is displaying behind other tools or indicators on the chart, clicking this action will bring the lines to the forefront.
Restore Default Settings: Click this action if you have adjusted the default settings of the tool, and wish to return to the standard properties originally installed with Optuma.
Save Settings as Default: If you have adjusted any of the tool's properties (colour, for example) you can save the adjustments as your new default setting. Each time you apply the tool to a chart, the tool will display using the new settings.
Delete: Delete the tool from the chart.
Tool Name: Allows you to adjust the name of the tool, as it is displayed in the Structure Panel.
Condition: Opens the Script Editor to select the required criteria. New criteria can be created or existing ones can be selected by clicking on the Saved Scripts button.
Size: Allows you to adjust the size of the Show Bar arrow. Moving the slider bar to the right increases the indicator size.
Display: Can be set to display as either an arrow, number, line, text, symbols and astro symbols.
Arrow Type: Can nominate to display either an up or down arrow.
Line Width: Allows you to adjust the width of the lines. Moving the slider bar to the right increases the width of the line.
Numbers to Show: This property only displays when the Display Type has been set to Numbers. This allows you to set whether a number displays above every bar, or only displays when the value changes.
Extend Up: Check this box to extend the line upwards.
Extend Down: Check this box to extend the line downwards.
Position: This setting enables you to select the position of the arrow either above or below the bar, or Floating (click and drag to position).
Symbol Colour: Allows you to select the colour of the Show Bar arrow. Clicking on the drop-down arrow will display a colour swatch. Locate the desired colour and left-click it once to select it.
Available from Optuma 2.0 and onward, if Number is the display type set for the Show Bar tool a Colour Scheme property will appear allowing for additional colour options such as Copy from Chart, Positive / Negative and Custom (controlled by script rules).
Tool Transparency: Use this slider bar to adjust the transparency of the tool. Moving the slider to the left will increase the transparency of the tool.
Visible: Un-tick this checkbox to hide the tool from the chart.
Show in Price Scale: When selected the current Show Bar value will be displayed in the Price Scale.
The Show Bar indicator can support numerical values, based on the resulting values of the script. As an example, the following script is a basic ranking system with 4 criteria (the higher the value the better the rank):
V1 = CLOSE() > OPEN() ;
V2 = GANNSWING() IsUp ;
V3 = VOL() IsUp ;
V4 = CLOSE() > MA() ;
V1 + V2 + V3 + V4
Using Show Bar with the above script, the resulting rank value can be plotted above each bar:
The value can be displayed above every bar, or can be set to display only when the value changes (as per the above example).
To define your own value and not the script result you could use an IF statement. In this example, outside bars will display with a value of 6 instead of the default value of 1 for a true condition.
V1 = BARTYPES(DEFAULT=Outside);
Below are a number of examples of formulas that can be used with the Show Bar tool. Also be sure to visit the Scripting Forum to see other examples and post queries.
CLOSE() > MA(BARS=150, STYLE=Exponential)
The bar will be marked when the Close is Greater than the value of a 150-period Exponential Moving Average.
DU() == 3
The bar will be marked when the Closing Price is Higher than the previous 3 day's Closing Price.
MA(BARS=25, STYLE=Exponential) CrossesAbove MA(BARS=50)
The bar will be marked when a 25-period Exponential Moving Average crosses above a 50-period Simple Moving Average.