Hi,

I'm trying to create a class that would store all my calculated data per asset. so I have this code:

public class AssetData{//class to handle all calculations of an asset private static Symbol _Symbol; private static ExponentialMovingAverage _EMAShort; private static ExponentialMovingAverage _EMALong; private static BollingerBands _BB; private static RelativeStrengthIndex _RSI; private static AverageTrueRange _ATR; private static SimpleMovingAverage _SMA; private static MovingAverageConvergenceDivergence _MACD; private static AroonOscillator _AROON; private static Momentum _MOM; private static StandardDeviation _STD; public AssetData(Symbol s){ _Symbol=s; //Set up Indicators: _BB = BB(_Symbol, 20, 1, MovingAverageType.Simple, Resolution.Daily); _RSI = RSI(_Symbol, 14, MovingAverageType.Simple, Resolution.Daily); _ATR = ATR(_Symbol, 14, MovingAverageType.Simple, Resolution.Daily); _EMAShort = EMA(_Symbol, 9, Resolution.Daily); _EMALong = EMA(_Symbol, 21, Resolution.Daily); _SMA = SMA(_Symbol, 14, Resolution.Daily); _MACD = MACD(_Symbol, 12, 26, 9, MovingAverageType.Simple, Resolution.Daily); _AROON = AROON(_Symbol, 20, Resolution.Daily); _MOM = MOM(_Symbol, 20, Resolution.Daily); _STD = STD(_Symbol, 20, Resolution.Daily); } public void UpdateIndicators() { } }

and i'm getting "An object reference is required" for all the indicator setup lines.

Can anybody help defuse this?

Author