def agg = GetAggregationPeriod() ;
AddLabel(yes,
if agg == AggregationPeriod.DAY then "Day" else
if agg == AggregationPeriod.WEEK then "Week" else
if agg == AggregationPeriod.HOUR then "Hour" else
if agg == AggregationPeriod.THIRTY_MIN then "30 mins" else
if agg == AggregationPeriod.FIFTEEN_MIN then "15 mins" else
if agg == AggregationPeriod.TEN_MIN then "10 mins" else
if agg == AggregationPeriod.FIVE_MIN then "5 mins" else
if agg == AggregationPeriod.THREE_MIN then "3 mins" else
if agg == AggregationPeriod.TWO_MIN then "2 mins" else
if agg == AggregationPeriod.MIN then "1 min" else "add your agg", Color.CYAN);
def agg = GetAggregationPeriod() ;
AddLabel(yes,
if agg == AggregationPeriod.DAY then "Day" else
if agg == AggregationPeriod.WEEK then "Week" else
if agg == AggregationPeriod.HOUR then "Hour" else
if agg == AggregationPeriod.THIRTY_MIN then "30 mins" else
if agg == AggregationPeriod.FIFTEEN_MIN then "15 mins" else
if agg == AggregationPeriod.TEN_MIN then "10 mins" else
if agg == AggregationPeriod.FIVE_MIN then "5 mins" else
if agg == AggregationPeriod.THREE_MIN then "3 mins" else
if agg == AggregationPeriod.TWO_MIN then "2 mins" else
if agg == AggregationPeriod.MIN then "1 min" else "add your agg", Color.CYAN);
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
HTML:def agg = GetAggregationPeriod() ; AddLabel(yes, if agg == AggregationPeriod.DAY then "Day" else if agg == AggregationPeriod.WEEK then "Week" else if agg == AggregationPeriod.HOUR then "Hour" else if agg == AggregationPeriod.THIRTY_MIN then "30 mins" else if agg == AggregationPeriod.FIFTEEN_MIN then "15 mins" else if agg == AggregationPeriod.TEN_MIN then "10 mins" else if agg == AggregationPeriod.FIVE_MIN then "5 mins" else if agg == AggregationPeriod.THREE_MIN then "3 mins" else if agg == AggregationPeriod.TWO_MIN then "2 mins" else if agg == AggregationPeriod.MIN then "1 min" else "add your agg", Color.CYAN);
Hi I use 1,2,3,5,10,15m TFs very often and would like to know if anyone has an idea of an indicator to just display it in the corner? thanks in advance!
def agg1 = GetAggregationPeriod();
AddLabel(1, if agg1 == 31536000000
then "Y" else
if agg1 == 7776000000
then "Q" else
if agg1 == 2592000000
then "M" else
if agg1 == 604800000
then "W" else
if agg1 >= 84400000 and agg1 < 604800000
then agg1 / 60000 / 1440 + "D" else
if agg1 >= 3600000 and agg1 < 84400000
then agg1 / 60000 / 60 + "H"
else agg1 / 60000 + "m", Color.YELLOW);
Hi I use 1,2,3,5,10,15m TFs very often and would like to know if anyone has an idea of an indicator to just display it in the corner? thanks in advance!
I don't understand why you would need that when it is already displayed next to the symbol.Hi I use 1,2,3,5,10,15m TFs very often and would like to know if anyone has an idea of an indicator to just display it in the corner? thanks in advance!
Start a new thread and receive assistance from our community.
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.
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.