So I cloned the "RSI with Martingale Position Sizing" algorithm from the university, stripped out all of the martingale logic to test a custom indicator. I was attempting to modify the custom RSI indicator and add a SMA crossover signal to it. Unfortunately I'm not well versed in C#

Does Anyone have any idea why I keep getting this error when I try and run a backtest? Here is the Stacktrace:

at System.Decimal.op_Addition (Decimal d1, Decimal d2) [0x00000] in :0

at QuantConnect.RelativeStrengthIndexCustom.UpdateDirectionalSMA (QuantConnect.FixedSizedQueue`1& queue, System.Decimal& sum, Decimal sample) [0x00000] in :0

at QuantConnect.RelativeStrengthIndexCustom.AddSample (QuantConnect.Data.Market.TradeBar bar) [0x00000] in :0

at QuantConnect.Constitution.OnData (QuantConnect.Data.Market.TradeBars data) [0x00000] in :0

at (wrapper remoting-invoke-with-check) QuantConnect.Constitution:OnData (QuantConnect.Data.Market.TradeBars)

at (wrapper dynamic-method) QuantConnect.Constitution:invoke (object,object[])

at QuantConnect.Lean.Engine.AlgorithmManager.Run (QuantConnect.Packets.AlgorithmNodePacket job, IAlgorithm algorithm, IDataFeed feed, ITransactionHandler transactions, IResultHandler results, IRealTimeHandler realtime, ICommandQueueHandler commands, CancellationToken token) [0x00000] in Lean.Engine.AlgorithmManager.Run (QuantConnect.Packets.AlgorithmNodePacket job, IAlgorithm algorithm, IDataFeed feed, ITransactionHandler transactions, IResultHandler results, IRealTimeHandler realtime, ICommandQueueHandler commands, CancellationToken token) [0x00000] in :0

Author