1. Home
  2. Declarations
  3. How to Use thinkScript declare lower (With Examples)

How to Use thinkScript declare lower (With Examples)

Have you ever wondered why some ThinkorSwim indicators are displayed below the chart rather than directly on it?

It’s not to save space. That’s a good guess, though.

Some indicators, such as MACD and volume, do not have values that are comparable to the stock price.

For the most part, their values are either significantly higher or lower than the stock price.

When you put the price history and the MACD indicator together, your chart will look like this:

The ThinkorSwim price action chart immediately shrank. Because of this, some indicators are better suited for placement below the chart.

What is declare lower in thinkScript?

In thinkScript, we use the declare lower; declaration when we want to place a study on the lower subgraph.

There is no other use for this declaration. It’s that simple.

If you don’t put the declaration on the first line of your script, it gets added to the upper chart.

As soon as you insert declare lower;, it gets moved to the bottom of the chart.

Here’s an example:

AddLabel(yes, "Just a small label", color.pink);

I’m using the AddLabel() function to draw a label on my chart.

If I want to move that label to the lower subgraph, all I have to do is add “declare lower;” right above the code.

delcare lower;
AddLabel(yes, "Just a small label", color.pink);

Happy testing!

Unlock the Power of ThinkorSwim

Get the latest news and updates on TD Ameritrade, ThinkorSwim indicators, thinkScript tutorials, and trading strategies delivered straight to your inbox every week.

We don’t spam! Unsubscribe at anytime.

One thought on “How to Use thinkScript declare lower (With Examples)

Leave a Reply

Your email address will not be published. Required fields are marked *