Hi I like to create DMI OSCILLATOR.

it is just DM+ minus DM -, and it is plotted as indicator. And i like to see different color on bar chart. So if the value of indicator is positive the bar is green or viceversa is red when the indicator is negative.


Hi Ciro,

You can add this script to a Show View tool.

a1 = ADX();
a1.DMPlus - a1.DMMinus

It will automatically show as green for up and red for down.

All the best


hi Mathew,

i have lost 30 minutes triyng fo figure out how to replace it, but no way.

I have to create a script ? i tried but I got invalid script

"show view Tool" where is it ?? i searched it everywhere, no way.


Hi Ciro,

Try replacing the long dash in the script to a minus sign and see if that works (for some reason this can get reformatted so the software doesn’t recognise it as a valid symbol).

Have you watched any of the scripting tutorial videos? It will take you through the basics of creating a scripting formula and understanding how / where they can be used. Sign in here:

The Show View tool is a standard scripting tool, allowing you to create any number of custom calculations:

I have created the indicator and I like to change the colors of bar accordingly with the indicator.

Unfortunatelly I don't remember how to do it.

please any help.



Hi Ciro,

See this KnowledgeBase article showing you how to colour the bars, along with another forum post:

Don’t forget you can search for help articles, blog & forum posts, and videos here: