Hi,

Newbie here trying to work my way through building first algo on Quantconnect. Using QCAlgorithm and RSIalpha as reference (https://github.com/QuantConnect/Lean/blob/master/Algorithm.Framework/Alphas/RsiAlphaModel.py)

How do I compare an indicator result vs the last close bar?

Example: calculate Bollinger band (bb). If last bar close > 2 times Bollinger upper band, trip high. Have used the GetState function in the RSI example:

    def GetState(self, bb, previous):
        if last_bar_close > 2*bb.UpperBand.Current.Value:
            return State.TrippedHigh