Custom Timeframes - 9Days

MCKS

New member
Plus
I would like to have a chart with a 9 day timeframe. Is that possible? If so, how do I add that timeframe please?

I'm using the Windows Desktop ToS app.
 
Solution
I'm sorry, but I am not getting it! When I followed the instructions, I have 1 minute bars displayed. I am after 3 years of data on a chart with each candle representing 9 days.

Am I correct in thinking the Time interval is the period of data available to be displayed on the chart and "Aggregate Period" is the number of periods making up each bar?

So wouldn't the Aggregate period for a chart where each candle represents 9 days have an Aggregate Period of 9 Days? If I wanted to have 3 years of data available to display on the chart, wouldn't I enter 3 yesrs as the timeframe.

Thank you for your patience and guidance.

Bruce
Your first post was lacking useful information (i.e. 3 year time interval and 9...
I would like to have a chart with a 9 day timeframe. Is that possible? If so, how do I add that timeframe please?

I'm using the Windows Desktop ToS app.
This 10 Chart layout has 1 thru 10 day customized timeframes with your 9 day request highlighted:

https://tos.mx/!MKjiuwgO

Each Timeframe is easily accessed thru the Time frame setup icon at the top of the Chart.

1745438112949.png


1745438251747.png
 
Thank you for responding. Added layout displayed all 1m timeframes.

I'm new to ToS, so am I correct in thinking the correct question I should be asking is Can I add custom "Aggregation Periods" beyond the default ones shown below:

1745447250028.png
 
Thank you for responding. Added layout displayed all 1m timeframes.

I'm new to ToS, so am I correct in thinking the correct question I should be asking is Can I add custom "Aggregation Periods" beyond the default ones shown below:

View attachment 24633
Yes, you can add custom timeframe periods (see the image I posted above for 9 day timeframe).
The drop-down list in the pic are the styles that I have saved in my personal Styles library.
Note: You must Save Style... after creating your new Chart Style so the settings you choose are retained and they will reside in your personal Styles library. Give your new style a unique name (again, see image) as you may prefer Candles or Heikin Ashi, colors, extended hours, Volume (many other Chart Settings options to set), etc.

As you are new to ToS please read: https://toslc.thinkorswim.com/center/howToTos/thinkManual/charts/Chart-Style-Settings

Also Bing/Google "thinkorswim chart customization" for videos on the subject.
 
I'm sorry, but I am not getting it! When I followed the instructions, I have 1 minute bars displayed. I am after 3 years of data on a chart with each candle representing 9 days.

Am I correct in thinking the Time interval is the period of data available to be displayed on the chart and "Aggregate Period" is the number of periods making up each bar?

So wouldn't the Aggregate period for a chart where each candle represents 9 days have an Aggregate Period of 9 Days? If I wanted to have 3 years of data available to display on the chart, wouldn't I enter 3 yesrs as the timeframe.

Thank you for your patience and guidance.

Bruce
 
I'm sorry, but I am not getting it! When I followed the instructions, I have 1 minute bars displayed. I am after 3 years of data on a chart with each candle representing 9 days.

Am I correct in thinking the Time interval is the period of data available to be displayed on the chart and "Aggregate Period" is the number of periods making up each bar?

So wouldn't the Aggregate period for a chart where each candle represents 9 days have an Aggregate Period of 9 Days? If I wanted to have 3 years of data available to display on the chart, wouldn't I enter 3 yesrs as the timeframe.

Thank you for your patience and guidance.

Bruce
Your first post was lacking useful information (i.e. 3 year time interval and 9 day aggregation period) for any member of the uTS community to properly assist.

The answer is what @rad14733 posted. Your specific request cannot be solved as there is not a Custom option for that 3 year time interval.
 
Last edited by a moderator:
Solution
My apologies for the original missing info and use of incorrect ToS terminology.

I am flexible with the time frame/interval (i.e. 3 years). The main focus is the Aggregation Period of 9 Days.

Is that aggregation Period available at all please, with any time frame/interval?

Thank you

Bruce
 
My apologies for the original missing info and use of incorrect ToS terminology.

I am flexible with the time frame/interval (i.e. 3 years). The main focus is the Aggregation Period of 9 Days.

Is that aggregation Period available at all please, with any time frame/interval?

Thank you

Bruce

This is meant to create candles on a daily chart based upon the number of bars/Days input.
To test the code, there are optional vertical lines, HLCO lines and hiding of price bars.
The new candles will plot after the number of bars input is reached.
A forming bar will appear as a bubble showing the HLCO status and potential color of it..

Code:
#Daily Chart to show Candles formed by Number of bars input

input numberofbars = 9;
input showverticals = no;
input showlines = no;
input showbubbles = yes;
input showdailycandles = no;

HidePricePlot(showdailycandles == no);

def bn = BarNumber();
def na = Double.NaN;
def bar = bn % numberofbars == 0;

AddVerticalLine(if showverticals == no then na else bar, "");

def h = if bar then high else if high > h[1] then high else h[1];
plot hh = h;
hh.SetHiding(!showlines);
def l = if bar then low else if low < l[1] then low else l[1];
plot ll = l;
ll.SetHiding(!showlines);
def o   = if bar then open else o[1];
plot oo = o;
oo.SetHiding(!showlines);
def c   = if bar[-1] then close else c[1];
plot cc = c;
cc.SetHiding(!showlines);

def h1 = if bar then hh[1] else na;
def l1 = if bar then ll[1] else na;
def o1 = if bar then oo[1] else na;
def c1 = if bar then cc[1] else na;
AddChart(if c1 > o1 then h1 else na, l1, o1, c1, ChartType.CANDLE, Color.GREEN);

def h2 = if bar then hh[1] else na;
def l2 = if bar then ll[1] else na;
def o2 = if bar then oo[1] else na;
def c2 = if bar then cc[1] else na;
AddChart(if o2 > c2 then h2 else na, l2, o2, c2, ChartType.CANDLE, Color.RED);

input bubblemover = 2;
def b  = bubblemover;
def b1 = b + 1;
def mover = IsNaN(close[b]) and !IsNaN(close[b1]);
def x = if bar then 1 else x[1] + 1;
plot xx = if IsNaN(close[-1]) and x < 9 then x else Double.NaN;


AddChartBubble(showbubbles and mover , if close[b1] < oo[b1 + 1] then hh[b1] else ll[b1], "H:" + hh[b1 + 1] + "\nO:" + oo[b1 + 1] + "\nC:" + close[b1] + "\nL:" + ll[b1 + 1] , if close[b1] > oo[b1 + 1] then Color.GREEN else if close[b1] < oo[b1 + 1] then Color.RED else Color.WHITE, if close[b1] < oo[b1 + 1] then no else yes );
AddChartBubble(showbubbles and mover, if close[b1] < oo[b1 + 1] then hh[b1] else ll[b1], "Forming\nBar: " + x[b1] + ":" + numberofbars,  if close[b1] > oo[b1 + 1] then Color.GREEN else if close[b1] < oo[b1 + 1] then Color.RED else Color.WHITE, if close[b1] < oo[b1 + 1] then yes else no );
#
 

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
466 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