How would I add a chart button that toggles (adds/removes) a technical indicator with specific preferences?

Here is an example: assume we want to create a button that will toggle Pivot Point indicator lines on and off. First, add the Pivot Point indicator to your chart with the preferred settings. To create a toggle button for any indicator in your chart, right-click on the indicator and choose "Add Button" from the ensuing pop-up menu. The button will then appear in the chart. To test it, click the button and watch the indicator in question disappear and then return as you click.

This button can be moved to its own pane (at the top) by right-clicking on the button and choosing "Move-->To New Pane". This will help keep the button(s) out of the way of other indicators and symbols in your chart. You can repeat this process for as many indicators as you wish. This is a great way to have quick access to technical indicators without cluttering up your chart.

More Details: The button that we created is actually a special kind technical indicator. You can explore the button indicator preferences by right-clicking on any button in your chart and choosing "Edit Button" from the popup menu. The button indicator has a variety of "Purpose" options available to it, one being Add/Remove Preset Indicator. Some others include Change the Periodicity and Change the Instrument. You can find out more about the button indicator and its various purposes searching the knowledge base for button indicator

The purpose we are using here, Add/Remove Preset Indicator, toggles an indicator with a specific set of preferences dictated by the "Preset" that is selected in the button preferences. Presets are not discussed in detail here, but you can learn more about Presets by searching the knowledge base for that term.

Presets give the user the ability to save multiple sets of preferences for any technical indicator for future reference in setting up indicators and for use in other ways like adding buttons. When the user right-clicks on an indicator in a chart and chooses to "Add Button", Investor/RT takes the current preferences of that indicator, and creates a "Preset" out of those settings, gives the Preset a name like "Button R1", and then finally creates the button indicator setup to toggle this Preset on and off in the chart.