# Branch Investment Group (BIG)
#wizard input: length1
#wizard text: -period
#wizard input: averageType1
#wizard text: crosses
#wizard input: crossingType
#wizard input: length2
#wizard text: -text
#wizard input: averageType2
#wizard text: GC
#wizard input: price
input price = Ohlc4;
input length1 = 4;
input length2 = 100;
input averageType1 = AverageType.SIMPLE;
input averageType2 = AverageType.SIMPLE;
input crossingType = {default above, below};
def avg1 = MovingAverage(averageType1, price, length1);
def avg2 = MovingAverage(averageType2, price, length2);
AddLabel (yes, if Price > avg2 then "BULL" + "" else "" , Color.LIGHT_GREEN);
AddLabel (yes, if Price < avg2 then "BEAR" + "" else "" , Color.RED);