Home                           

 Try Investor/RT             

 Investor/RT Tour           

 Getting Started              

 What's New                  

 Testimonials                 

  Q&A - Broken down by Topic . . .      Complete List of Questions - All Topics
     Charts and Technical Indicators      TPO Charts
     RTL: Scans, Signals, and Custom Indicators      Importing and Exporting
     Trading Systems and Backtesting      Schedules
     Quotepages, Portfolios and Custom Columns      Alarms / Alerts
     Data: Historical Data, the Database, and Data Services      User Variables (T# and V#)
     Custom Instruments: Spreads and Pairs      General / Miscellaneous
     Controls, Windows, and the Button Indicator      Autotrading
     Slide Shows      Product Line

 
Q&A Home

Investor/RT Answer
Answers to Common Questions

Question

How would I add a button to a chart which toggles a specific technical indicator (with a specific set of preferences) on and off?

Answer

I'll start by providing the quick and easy way to make this happen, followed by a more detailed explanation of what's going on behind the scenes.

In our example, let's assume we want to create a button that will toggle our Pivot Point indicator lines on and off.  First, just add the Pivot Point indicator to your chart with the preferred settings.  (You may want to visit this Q&A on adding Daily and Weekly Pivots to Intraday Charts)  Now, order to create a toggle button for any indicator in your chart, simply right-click on that indicator and choose "Add Button" from the pop-up menu that appears.  That's it.  There are two things that will tell you that you right-clicked on the proper place.  First, you should see the indicator change appearance slightly to let you know it's selected (usually, the indicator line(s) become bolder).  Second, the popup menu contain the "Add Button" option right at the top.  In the case of our Pivot Point button, the button will be created with the title "Pvpt" by default.  Click on this button should remove the Pivot Point indicator from the chart.  Clicking on it again should bring it back.

This button can be moved to it's own separate pane (at the top) by right-clicking on the button and choosing "All to New Pane".  This will help keep the button(s) out of the way of other indicators and symbols in your chart.  You can do 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.

That's really all you need to know to accomplish this, but if you'd like to learn more about what's going on behind the scenes, then read on.

The button that we created is actually a technical indicator of it's own.  You can explore the button indicators preferences by right-clicking on that button in your chart and choosing "Edit this Button" from the popup menu. (while you're add it, explore the other options you have in this 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", "Change the Instrument", etc.  You can find out more about the button indicator and it's various purposes by visiting:

www.linnsoft.com/tour/techind/buttons.htm

The purpose we are using here, "Add/Remove Preset Indicator", basically just toggles an indicator with a specific set of preferences dictated by the "Preset" that is selected in the button preferences.  I won't go into Presets here, but you can learn much more about Presets at:

www.linnsoft.com/tour/presets.htm

Basically, Presets give the user the ability to save multiple sets of preferences for any technical indicator, for easy future reference, and for use in other places like this button indicator.  When the user right-clicks on an indicator in a chart and chooses to "Add Button", Investor/RT just 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 properly setup to toggle this Preset on and off in the chart.