Resource icon

What is hide_on_daily in ThinkorSwim?

declare hide_on_daily; can be used to hide an indicator from displaying on the Daily chart. This also applies to other timeframes such as Weekly and Monthly. Anything equal to or higher than the Daily timeframe will be hidden.

Usage

Code:
declare hide_on_daily;

Example

Code:
#
# TD Ameritrade IP Company, Inc. (c) 2017-2020
#

declare hide_on_daily;

input price = close;
input length = 9;
input displace = 0;
input showBreakoutSignals = no;

plot SMA = Average(price[-displace], length);
plot UpSignal = price crosses above SMA;
plot DownSignal = price crosses below SMA;

UpSignal.SetHiding(!showBreakoutSignals);
DownSignal.SetHiding(!showBreakoutSignals);

SMA.SetDefaultColor(GetColor(1));
UpSignal.SetDefaultColor(Color.UPTICK);
UpSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
DownSignal.SetDefaultColor(Color.DOWNTICK);
DownSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

Placing declare hide_on_daily; in the code above will prevent the indicator from showing the 9 period simple moving average on the Daily chart. The moving average will still be visible when you switch to a lower aggregation period (i.e, 5 min or 1HR)

Additional scripts related to hide_on_daily

Author
BenTen
Views
142
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from BenTen

Top