input price = FundamentalType.CLOSE;
input aggregationPeriod = AggregationPeriod.HOUR;
#input aggregationPeriodD = AggregationPeriod.DAY;
input length8 = 8;
input length34 = 34;
input length5 = 5;
input length13 = 13;
input averageType1 = AverageType.EXPONENTIAL;
input averageType2 = AverageType.EXPONENTIAL;
input crossingType = {default above, below};
def avg8 = MovingAverage(averageType1, Fundamental(price, period = aggregationPeriod), length8);
def avg34 = MovingAverage(averageType2, Fundamental(price, period = aggregationPeriod), length34);
def avg5 = MovingAverage(averageType1, Fundamental(price, period = AggregationPeriod.DAY), length5);
def avg13 = MovingAverage(averageType2, Fundamental(price, period = AggregationPeriod.DAY), length13);
def Crossabove513Daily = Crosses(avg5, avg13, crossingType == crossingType.above);
def Crossabove834Hour = Crosses(avg8, avg34, crossingType == crossingType.above);
plot mylist = Crossabove513 and Crossabove834;