PeriodIndx = Floor((daysFromDate(first(yyyyMmDd)) + getDayOfWeek(first(yyyyMmDd))) / 7) TimeFrame = timeFrame.WEEK and cap >= AggregationPeriod.MONTH Īssert(!errorInAggregation, 'timeFrame should be not less than current chart aggregation period') Def AvgBodyFull = Round((CandleBody / FullLength) * 100, 1) ĭef smallbody = if AvgBodyFull = AggregationPeriod.WEEK or