Monthly aggregation code is not working

apjithesh

New member
VIP
The Week one shows the label correctly, but the month one is just black, tried troubleshooting, but was not getting anywhere. Please help

Code:
def TWeek_H = close(period = AggregationPeriod.WEEK,priceType=  PriceType.LAST);
def TWeek_L = open(period =AggregationPeriod.WEEK);
def TMonth_H = close(period = AggregationPeriod.MONTH,priceType=  PriceType.LAST);
def TMonth_L = open(period =AggregationPeriod.MONTH);

AddLabel(yes, "Week", if TWeek_H > TWeek_L   then Color.GREEN else Color.RED);
AddLabel(yes, "Month", if TMonth_H > TMonth_L   then Color.GREEN else Color.RED);
 

cay7man

Member
VIP
I was trying to do the above as well but I realize after reading this thread
it is not possible.
Is there any way to check if monthly/weekly/daily are up from 5 min chart?
 

Similar threads

Top