Hi,
I've been trying to implement Chande Momemtum Oscillator indicator in QC platform and I noticed that the cmo data provided was different from Tradingview.
On closer inspection and observing the C# codes, I noticed there's 1 error in the C# code that may have contributed to the error/discrepency.

Both the CMO data provided by TA & Tradingview matched and implies there's no inherent database differences.

There's another Forum thread also found CMO discrepency reported previously:
https://www.quantconnect.com/forum/discussion/12510/discrepancy-between-quantconnect-and-tradingview/p1


I think the error came from the C# code starting Line 84:
C# source code: https://github.com/QuantConnect/Lean/blob/master/Indicators/ChandeMomentumOscillator.cs
******************************
if (difference < 0)
_prevLoss -= difference;
else
     _prevGain += difference;
******************************
The above if statement do not update both _prevLoss AND _prevGain, it only EITHER update _prevLoss OR _preGain. This explains the discrepency.