Multi-Timeframe Keltner Channel (MTF) for ThinkorSwim

kingkunta

New member
Hi, in my trading i mostly use Multitimeframe keltner channels and would like to know if there is a way to show the ccurrent keltner bar for the time frame to be plotted instead of all the ones before it.

example:

cbnWPIh.png


the blue box represents the current 30 min keltner and the green represents the current 15min.

Any help is appreciated thank you!
 
Last edited:
Here is the Multiple Time Frame version of the Keltner Channel.

Code:
# MTF Keltner Channel
# Assembled by BenTen at UseThinkScript.com

declare weak_volume_dependency;

input aggregationPeriod = AggregationPeriod.DAY;
def open = open(period = aggregationPeriod);
def high = high(period = aggregationPeriod);
def low = low(period = aggregationPeriod);
def close = close(period = aggregationPeriod);

input displace = 0;
input factor = 1.5;
input length = 20;
def price = close;
input averageType = AverageType.SIMPLE;
input trueRangeAverageType = AverageType.SIMPLE;

def shift = factor * MovingAverage(trueRangeAverageType, TrueRange(high, close, low), length);

def average = MovingAverage(averageType, price, length);

plot Avg = average[-displace];
Avg.SetDefaultColor(GetColor(1));

plot Upper_Band = average[-displace] + shift[-displace];
Upper_Band.SetDefaultColor(GetColor(8));

plot Lower_Band = average[-displace] - shift[-displace];
Lower_Band.SetDefaultColor(GetColor(5));
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Thanks ben for the quick response, but I'm actually wondering more about how to create kelts where it only plot the current 15min/30 min box period, such as the picture i posted above
 
Here is the Multiple Time Frame version of the Keltner Channel.

Code:
# MTF Keltner Channel
# Assembled by BenTen at UseThinkScript.com

declare weak_volume_dependency;

input aggregationPeriod = AggregationPeriod.DAY;
def open = open(period = aggregationPeriod);
def high = high(period = aggregationPeriod);
def low = low(period = aggregationPeriod);
def close = close(period = aggregationPeriod);

input displace = 0;
input factor = 1.5;
input length = 20;
def price = close;
input averageType = AverageType.SIMPLE;
input trueRangeAverageType = AverageType.SIMPLE;

def shift = factor * MovingAverage(trueRangeAverageType, TrueRange(high, close, low), length);

def average = MovingAverage(averageType, price, length);

plot Avg = average[-displace];
Avg.SetDefaultColor(GetColor(1));

plot Upper_Band = average[-displace] + shift[-displace];
Upper_Band.SetDefaultColor(GetColor(8));

plot Lower_Band = average[-displace] - shift[-displace];
Lower_Band.SetDefaultColor(GetColor(5));
Ben you are awesome, but you probably know that already. :). quick inquiry for you. I put the indicator on my chart but haven't had any luck on getting the multitimeframe keltner channel to display on my charts. Im not sure what Im doing wrong. I tried changing the time frames on the indicator as well as my charts. I also tried changing the instruments to trade on with no luck. When you have a second will you help me out with this one? I appreciate you. Thank you Thank you.
 
@Ryguy I just tried the Study and it works as expected if you match the aggregation period setting to match the timeframe of your chart... I tested multiple timeframes with matching aggregation periods and had no issues whatsoever with any of them...

However, the original question presented by the OP was never answered by @BenTen... So, while the code presented works, it doesn't work like the picture in the first post...

19zwMS6.png


Ys9ofH2.png
 
@Ryguy I just tried the Study and it works as expected if you match the aggregation period setting to match the timeframe of your chart... I tested multiple timeframes with matching aggregation periods and had no issues whatsoever with any of them...

However, the original question presented by the OP was never answered by @BenTen... So, while the code presented works, it doesn't work like the picture in the first post...

19zwMS6.png


Ys9ofH2.png
My apologies. I did get it to work perfectly. thank you thank you :)
 
Hi, in my trading i mostly use Multitimeframe keltner channels and would like to know if there is a way to show the ccurrent keltner bar for the time frame to be plotted instead of all the ones before it.

example:

View attachment 9327

the blue box represents the current 30 min keltner and the green represents the current 15min.

Any help is appreciated thank you!
Do you mind sharing the script?
 
Hi, in my trading i mostly use Multitimeframe keltner channels and would like to know if there is a way to show the ccurrent keltner bar for the time frame to be plotted instead of all the ones before it.

example:

View attachment 9327

the blue box represents the current 30 min keltner and the green represents the current 15min.

Any help is appreciated thank you!
could you please share your chart? thanks in advance!!
 
Do you mind sharing the script?
could you please share your chart? thanks in advance!!


Did you know that by clicking on a member's name, you can easily check when they were last seen on the uTS forum? It's a great way to keep track of who's been around recently, and who hasn't. Speaking of which, it looks @kingkunta is no longer active. :(

Therefore, not available to share his charts.
 
Last edited:
Hi, in my trading i mostly use Multitimeframe keltner channels and would like to know if there is a way to show the ccurrent keltner bar for the time frame to be plotted instead of all the ones before it.

example:

View attachment 9327

the blue box represents the current 30 min keltner and the green represents the current 15min.

Any help is appreciated thank you!
Hi, can you share these chart settings please? Thanks.
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
253 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top