# 50% of candles.

#### lintotomy

##### New member
Is there a way we can get 50%of last 30 candles in 30 mints chart.

Solution
Is there a way we can get 50%of last 30 candles in 30 mints chart.
Welcome to you as a new member!

I am not really sure what you want, so I have some data that might help. There are 2 defs, one the sum of 30, 30 minute bar closes and the other is the sum of 30. 30 minute (high-low)/2 bars. The label displays 50% of the sum of the close. You could make similar one's with the other sum or some other you want instead.

Ruby:
``````def c  = Sum(close(period = AggregationPeriod.THIRTY_MIN), 30);
def hl = Sum(hl2(period = AggregationPeriod.THIRTY_MIN), 30);
AddLabel(1, "30 bar Close @50% : " + (c * .5), Color.WHITE);``````
Is there a way we can get 50%of last 30 candles in 30 mints chart.
Welcome to you as a new member!

I am not really sure what you want, so I have some data that might help. There are 2 defs, one the sum of 30, 30 minute bar closes and the other is the sum of 30. 30 minute (high-low)/2 bars. The label displays 50% of the sum of the close. You could make similar one's with the other sum or some other you want instead.

Ruby:
``````def c  = Sum(close(period = AggregationPeriod.THIRTY_MIN), 30);
def hl = Sum(hl2(period = AggregationPeriod.THIRTY_MIN), 30);
AddLabel(1, "30 bar Close @50% : " + (c * .5), Color.WHITE);``````

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