# open plot for non-standard 8 & 12 hour aggregation periods?

##### New member
Does anybody know how to accomplish this?

You can plot a variety of standard aggregation periods up to 4 hours, but what about 8 and 12? I need a study that marks the open of these candles and know it's possible, I just can't figure it out based off of the TOS self help site/library. Their DailyOpen code is below:

Code:
``````input aggregationPeriod = AggregationPeriod.DAY;
input showOnlyLastPeriod = yes;

def prevPrice = open(period = aggregationPeriod)[-1];
def price = open(period = aggregationPeriod);
plot DailyOpen = if showOnlyLastPeriod and !IsNaN(prevPrice) then Double.NaN else price;

DailyOpen.SetDefaultColor(GetColor(2));
DailyOpen.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);``````

We are limited by the capabilities of TOS and that would include available aggregation periods... We have to live within those limitations... The list of aggregation periods is what it is... I am not aware of any workarounds to accomplish the task of non-standard aggregation periods...

We are limited by the capabilities of TOS and that would include available aggregation periods... We have to live within those limitations... The list of aggregation periods is what it is... I am not aware of any workarounds to accomplish the task of non-standard aggregation periods...
@rad14733 thanks for the insight, that's too bad... would aggregating three 4-hour periods be something that you can conceive of?

@hydroflask I've never tinkered with aggregation much so I can't say whether it might work or not... Give it a shot and report back...

@hydroflask I've never tinkered with aggregation much so I can't say whether it might work or not... Give it a shot and report back...
I don't know how

I don't know how
It's a logic problem... You start out by . . . . starting... That's how I tackle logic problems every day...

About a week ago we had a member ask a question but I don't just jump when someone has wants... Last night I was working on something else that had some correlation to that members want so once I had my wants and needs done I ventured further and came up with something that the member or someone else can expound upon... If nothing else just keep the idea in the back of your mind and maybe you'll have an epiphany someday while off on another tangent... Happens all the time for me... One of my mantras is "The more you know, the more you know!"... My other one is "There's a lotta out there out there!"...

Merry Christmas...!!!

It's a logic problem... You start out by . . . . starting... That's how I tackle logic problems every day...

About a week ago we had a member ask a question but I don't just jump when someone has wants... Last night I was working on something else that had some correlation to that members want so once I had my wants and needs done I ventured further and came up with something that the member or someone else can expound upon... If nothing else just keep the idea in the back of your mind and maybe you'll have an epiphany someday while off on another tangent... Happens all the time for me... One of my mantras is "The more you know, the more you know!"... My other one is "There's a lotta out there out there!"...

Merry Christmas...!!!
Thanks for taking the time to share this valuable wisdom. I meant don't know how I would start aggregating three 4H periods. Merry Christmas to you, too.

87k+ Posts
334 Online

## The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
• Exclusive indicators
• Proven strategies & setups
• Private Discord community
• Exclusive members-only content
• 1 full year of unlimited support

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?