Step 1:
Most of the time, it’s easier to start from a pre-loaded script you want to modify, adapt to a specific problem to resolve. In order to do that, open the custom indicator panel, using the menu Indicators or the « Z » keyboard shortcut.
Press the button « New ». You should now see a blank text field, and the name of the new indicator, arbitrarily set to « New ».

Screen Shot 2012-03-13 at 3.08.41 PM

Screen Shot 2012-03-13 at 3.09.32 PM

Step 2:
Copy and paste the original script into the blank text field.

Make sure you select the right configuration: In this particular case, we’re going to modify the Derivative Oscillator to display an histogram rather than two curves. We select « bar » and we select « indicator ».
We could have changed the color by clicking on the color well, but let’s say Red is fine.

Modify the script.

In this case, we replaced:
derivHisto = firstResult - secondResult

Screen Shot 2012-03-13 at 3.10.47 PM

Step 3:

Time to test how smart we are… Just press the « Execute » button.

If the script is right, you should see the result in the preview area, on the right of the panel.

Screen Shot 2012-03-13 at 3.11.03 PM

Step 4:

There is no step 4… Just press the « Ok » button. The « New » indicator should now appear in all the menus.