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!
Thank you for this. I was looking at it and am a little confused because my script says this
declare lower;
AddLabel(yes, “Just a lower label”, color.pink);
But it ends up on the top. Why?
https://imgur.com/a/vM6x4C2