public void BuildCore(ISessionIndicator sessionIndicator) { string coreIdentityCode = ADXCore.CreateIdentityCode(periods); core = sessionIndicator.CoreIndicators.ContainsKey(coreIdentityCode) ? sessionIndicator.CoreIndicators[coreIdentityCode].IndicatorInstance as ADXCore : null; if (core == null) { string trueRangeIdentityCode = TrueRangeCore.CreateIdentityCode(); TrueRangeCore trueRangeCore = sessionIndicator.CoreIndicators.ContainsKey(trueRangeIdentityCode) ? sessionIndicator.CoreIndicators[trueRangeIdentityCode].IndicatorInstance as TrueRangeCore : null; if (trueRangeCore == null) { trueRangeCore = TrueRangeCore.CreateInstance(barType); sessionIndicator.CoreIndicators.Add(trueRangeCore.IdentityCode, new CoreIndicator(trueRangeCore)); } string dmIdentityCode = DirectionalMovementCore.CreateIdentityCode(); DirectionalMovementCore dmCore = sessionIndicator.CoreIndicators.ContainsKey(dmIdentityCode) ? sessionIndicator.CoreIndicators[dmIdentityCode].IndicatorInstance as DirectionalMovementCore : null; if (dmCore == null) { dmCore = DirectionalMovementCore.CreateInstance(barType); sessionIndicator.CoreIndicators.Add(dmCore.IdentityCode, new CoreIndicator(dmCore)); } string dxIdentityCode = DirectionalMovementIndexCore.CreateIdentityCode(periods); DirectionalMovementIndexCore dxCore = sessionIndicator.CoreIndicators.ContainsKey(dxIdentityCode) ? sessionIndicator.CoreIndicators[dxIdentityCode].IndicatorInstance as DirectionalMovementIndexCore : null; if (dxCore == null) { dxCore = DirectionalMovementIndexCore.CreateInstance(barType, periods, trueRangeCore, dmCore); sessionIndicator.CoreIndicators.Add(dxCore.IdentityCode, new CoreIndicator(dxCore)); } core = ADXCore.CreateInstance(barType, periods, dxCore, this.OnCalculationCompleted); sessionIndicator.CoreIndicators.Add(core.IdentityCode, new CoreIndicator(core)); } }
public void BuildCore(ISessionIndicator sessionIndicator) { string coreIdentityCode = MACDCore.CreateIdentityCode(fastEMAPeriod, slowEMAPeriod, signalLinePeriod); core = sessionIndicator.CoreIndicators.ContainsKey(coreIdentityCode) ? sessionIndicator.CoreIndicators[coreIdentityCode].IndicatorInstance as MACDCore : null; if (core == null) { string fastEMAIdentityCode = EMACore.CreateIdentityCode(fastEMAPeriod); EMACore fastEMACore = sessionIndicator.CoreIndicators.ContainsKey(fastEMAIdentityCode) ? sessionIndicator.CoreIndicators[fastEMAIdentityCode].IndicatorInstance as EMACore : null; if (fastEMACore == null) { fastEMACore = EMACore.CreateInstance(barType, fastEMAPeriod); sessionIndicator.CoreIndicators.Add(fastEMACore.IdentityCode, new CoreIndicator(fastEMACore)); } string slowEMAIdentityCode = EMACore.CreateIdentityCode(slowEMAPeriod); EMACore slowEMACore = sessionIndicator.CoreIndicators.ContainsKey(slowEMAIdentityCode) ? sessionIndicator.CoreIndicators[slowEMAIdentityCode].IndicatorInstance as EMACore : null; if (slowEMACore == null) { slowEMACore = EMACore.CreateInstance(barType, slowEMAPeriod); sessionIndicator.CoreIndicators.Add(slowEMACore.IdentityCode, new CoreIndicator(slowEMACore)); } core = MACDCore.CreateInstance(barType, fastEMACore, slowEMACore, signalLinePeriod, this.OnCalculationCompleted); sessionIndicator.CoreIndicators.Add(core.IdentityCode, new CoreIndicator(core)); } }
public void BuildCore(ISessionIndicator sessionIndicator) { string coreIdentityCode = StochasticsCore.CreateIdentityCode(periods); core = sessionIndicator.CoreIndicators.ContainsKey(coreIdentityCode) ? sessionIndicator.CoreIndicators[coreIdentityCode].IndicatorInstance as StochasticsCore : null; if (core == null) { string priceChangeIdentityCode = PriceChangeCore.CreateIdentityCode(); PriceChangeCore priceChangeCore = sessionIndicator.CoreIndicators.ContainsKey(priceChangeIdentityCode) ? sessionIndicator.CoreIndicators[priceChangeIdentityCode].IndicatorInstance as PriceChangeCore : null; if (priceChangeCore == null) { priceChangeCore = PriceChangeCore.CreateInstance(barType); sessionIndicator.CoreIndicators.Add(priceChangeCore.IdentityCode, new CoreIndicator(priceChangeCore)); } string highsAndLowsIdentityCode = HighsAndLowsCore.CreateIdentityCode(periods); HighsAndLowsCore highsAndLowsCore = sessionIndicator.CoreIndicators.ContainsKey(highsAndLowsIdentityCode) ? sessionIndicator.CoreIndicators[highsAndLowsIdentityCode].IndicatorInstance as HighsAndLowsCore : null; if (highsAndLowsCore == null) { highsAndLowsCore = HighsAndLowsCore.CreateInstance(barType, periods); sessionIndicator.CoreIndicators.Add(highsAndLowsCore.IdentityCode, new CoreIndicator(highsAndLowsCore)); } if (smoothedPercentK) { core = StochasticsCore.CreateInstance(barType, periods, smoothedPercentKPeriods, smoothedPercentDPeriods, priceChangeCore, highsAndLowsCore, this.OnCalculationCompleted); } else { core = StochasticsCore.CreateInstance(barType, periods, smoothedPercentK, priceChangeCore, highsAndLowsCore, this.OnCalculationCompleted); } sessionIndicator.CoreIndicators.Add(core.IdentityCode, new CoreIndicator(core)); } }
public ScreenCaster(Conductor conductor, ICursorIconWatcher cursorIconWatcher, ISessionIndicator sessionIndicator, IShutdownService shutdownService) { _conductor = conductor; _cursorIconWatcher = cursorIconWatcher; _sessionIndicator = sessionIndicator; _shutdownService = shutdownService; }
public void BuildCore(ISessionIndicator sessionIndicator) { string coreIdentityCode = ParabolicSARCore.CreateIdentityCode(periods); core = sessionIndicator.CoreIndicators.ContainsKey(coreIdentityCode) ? sessionIndicator.CoreIndicators[coreIdentityCode].IndicatorInstance as ParabolicSARCore : null; if (core == null) { core = ParabolicSARCore.CreateInstance(barType, periods, this.OnCalculationCompleted); sessionIndicator.CoreIndicators.Add(core.IdentityCode, new CoreIndicator(core)); } }
public void BuildCore(ISessionIndicator sessionIndicator) { string coreIdentityCode = BollingerBandsCore.CreateIdentityCode(periods); core = sessionIndicator.CoreIndicators.ContainsKey(coreIdentityCode) ? sessionIndicator.CoreIndicators[coreIdentityCode].IndicatorInstance as BollingerBandsCore : null; if (core == null) { string smaIdentityCode = SMACore.CreateIdentityCode(periods); SMACore smaCore = sessionIndicator.CoreIndicators.ContainsKey(smaIdentityCode)? sessionIndicator.CoreIndicators[smaIdentityCode].IndicatorInstance as SMACore: null; if (smaCore == null) { smaCore = SMACore.CreateInstance(barType, periods); sessionIndicator.CoreIndicators.Add(smaCore.IdentityCode, new CoreIndicator(smaCore)); } core = BollingerBandsCore.CreateInstance(barType, periods, smaCore, this.OnCalculationCompleted, stdMultiplier); sessionIndicator.CoreIndicators.Add(core.IdentityCode, new CoreIndicator(core)); } }
public void BuildCore(ISessionIndicator sessionIndicator) { string coreIdentityCode = ATRCore.CreateIdentityCode(periods); core = sessionIndicator.CoreIndicators.ContainsKey(coreIdentityCode) ? sessionIndicator.CoreIndicators[coreIdentityCode].IndicatorInstance as ATRCore : null; if (core == null) { string trueRangeIdentityCode = TrueRangeCore.CreateIdentityCode(); TrueRangeCore trueRangeCore = sessionIndicator.CoreIndicators.ContainsKey(trueRangeIdentityCode) ? sessionIndicator.CoreIndicators[trueRangeIdentityCode].IndicatorInstance as TrueRangeCore : null; if (trueRangeCore == null) { trueRangeCore = TrueRangeCore.CreateInstance(barType); sessionIndicator.CoreIndicators.Add(trueRangeCore.IdentityCode, new CoreIndicator(trueRangeCore)); } core = ATRCore.CreateInstance(barType, periods, trueRangeCore, this.OnCalculationCompleted); sessionIndicator.CoreIndicators.Add(core.IdentityCode, new CoreIndicator(core)); } }
public void BuildCore(ISessionIndicator sessionIndicator) { string coreIdentityCode = CCICore.CreateIdentityCode(periods); core = sessionIndicator.CoreIndicators.ContainsKey(coreIdentityCode) ? sessionIndicator.CoreIndicators[coreIdentityCode].IndicatorInstance as CCICore : null; if (core == null) { string tpmaIdentityCode = TPMACore.CreateIdentityCode(periods); TPMACore tpmaCore = sessionIndicator.CoreIndicators.ContainsKey(tpmaIdentityCode) ? sessionIndicator.CoreIndicators[tpmaIdentityCode].IndicatorInstance as TPMACore : null; if (tpmaCore == null) { tpmaCore = TPMACore.CreateInstance(barType, periods); sessionIndicator.CoreIndicators.Add(tpmaCore.IdentityCode, new CoreIndicator(tpmaCore)); } core = CCICore.CreateInstance(barType, periods, tpmaCore, this.OnCalculationCompleted); sessionIndicator.CoreIndicators.Add(core.IdentityCode, new CoreIndicator(core)); } }
public void BuildCore(ISessionIndicator sessionIndicator) { string coreIdentityCode = RSICore.CreateIdentityCode(periods); core = sessionIndicator.CoreIndicators.ContainsKey(coreIdentityCode) ? sessionIndicator.CoreIndicators[coreIdentityCode].IndicatorInstance as RSICore : null; if (core == null) { string priceChangeIdentityCode = PriceChangeCore.CreateIdentityCode(); PriceChangeCore priceChangeCore = sessionIndicator.CoreIndicators.ContainsKey(priceChangeIdentityCode) ? sessionIndicator.CoreIndicators[priceChangeIdentityCode].IndicatorInstance as PriceChangeCore : null; if (priceChangeCore == null) { priceChangeCore = PriceChangeCore.CreateInstance(barType); sessionIndicator.CoreIndicators.Add(priceChangeCore.IdentityCode, new CoreIndicator(priceChangeCore)); } core = RSICore.CreateInstance(barType, periods, priceChangeCore, this.OnCalculationCompleted); sessionIndicator.CoreIndicators.Add(core.IdentityCode, new CoreIndicator(core)); } }