protected override void Initialize() { macd = Indicators.MacdCrossOver(MarketSeries.Close, 26, 12, 9); wma300 = Indicators.WeightedMovingAverage(MarketSeries.Close, 300); ema8 = Indicators.ExponentialMovingAverage(MarketSeries.Close, 8); arrowOffset = Symbol.PipSize * 20; }
protected override void OnStart() { ema = Indicators.ExponentialMovingAverage(MarketSeries.Close, period); Positions.Opened += PositionsOnOpened; Positions.Closed += PositionsOnClosed; }
protected override void Initialize() { try { // Initialize and create nested indicators Print("Initializing Zone PullBack indicator"); Print("Running mode: {0}", RunningMode); Print("IsBackTesting: {0}", IsBacktesting); _fastMA = Indicators.MovingAverage(Source, 21, MovingAverageType.Exponential); _mediumMA = Indicators.MovingAverage(Source, 55, MovingAverageType.Exponential); _slowMA = Indicators.MovingAverage(Source, 89, MovingAverageType.Simple); _latestSignalIndex = 0; _maRangeBuffer = Symbol.PipSize * 4; var dailySeries = MarketData.GetBars(TimeFrame.Daily); if (LongTermTrendFilter) { _dailyFastMA = Indicators.ExponentialMovingAverage(dailySeries.ClosePrices, 21); _dailyMediumMA = Indicators.ExponentialMovingAverage(dailySeries.ClosePrices, 55); } Print("Finished initializing"); } catch (Exception ex) { Print("Failed initialization: {0}", ex); throw; } }
//****************************************** protected override void Initialize() { //************************************** LR_Slope = Indicators.LinearRegressionSlope(MarketSeries.Close, 12); MA20 = Indicators.ExponentialMovingAverage(MarketSeries.Close, 20); MA50 = Indicators.ExponentialMovingAverage(MarketSeries.Close, 50); MA100 = Indicators.ExponentialMovingAverage(MarketSeries.Close, 100); LTF_Candle = MarketData.GetSeries(LTF); MTF_Candle = MarketData.GetSeries(MTF); STF_Candle = MarketData.GetSeries(STF); //************************************** /////////////////////////////////////////////////////////// // Initialize and create nested indicators MA = Indicators.MovingAverage(MarketSeries.Close, MA_Periods, MovingAverageType.Exponential); // Initalize RSI RSI = Indicators.RelativeStrengthIndex(MarketSeries.Close, RSI_Periods); // Initalize CCI CCI = Indicators.CommodityChannelIndex(MarketSeries, CCI_Periods); thecount = MarketSeries.Close.Count; Print("theCount = " + thecount); }
protected override void Initialize() { plusdi = CreateDataSeries(); minusdi = CreateDataSeries(); plusma = Indicators.ExponentialMovingAverage(plusdi, Period); minusma = Indicators.ExponentialMovingAverage(minusdi, Period); }
protected override void Initialize() { diff = CreateDataSeries(); ema1 = Indicators.ExponentialMovingAverage(MarketSeries.Close, (int)(Period / 2)); ema2 = Indicators.ExponentialMovingAverage(MarketSeries.Close, Period); ema3 = Indicators.ExponentialMovingAverage(diff, (int)(Math.Sqrt(Period))); }
////////////TVI Params End ////////////////// protected override void Initialize() { //////////////TVI Init Start ////////////// UpTick = CreateDataSeries(); DnTick = CreateDataSeries(); TVI_Calculate = CreateDataSeries(); EMA_UpTick = Indicators.ExponentialMovingAverage(UpTick, EMA); EMA_DnTick = Indicators.ExponentialMovingAverage(DnTick, EMA); DEMA_UpTick = Indicators.ExponentialMovingAverage(EMA_UpTick.Result, DEMA); DEMA_DnTick = Indicators.ExponentialMovingAverage(EMA_DnTick.Result, DEMA); TVI = Indicators.ExponentialMovingAverage(TVI_Calculate, TEMA); //////////////TVI init End /////////////// // Initialize and create nested indicators LongTF_Series = MarketData.GetSeries(Ref_TF); MedTF_Series = MarketData.GetSeries(Med_TF); SmallTF_Series = MarketData.GetSeries(Lil_TF); MA50 = Indicators.ExponentialMovingAverage(MarketSeries.Close, Ma_Periods); MA50_LongTF = Indicators.ExponentialMovingAverage(LongTF_Series.Close, Ma_Periods); MA50_MedTF = Indicators.ExponentialMovingAverage(MedTF_Series.Close, Ma_Periods); MA50_SmallTF = Indicators.ExponentialMovingAverage(SmallTF_Series.Close, Ma_Periods); }
protected override void Initialize() { iSeries1 = CreateDataSeries(); iSeries4 = CreateDataSeries(); _sma = Indicators.SimpleMovingAverage(MarketSeries.Close, Len1); _sma2 = Indicators.SimpleMovingAverage(_sma.Result, Len1); _sma3 = Indicators.SimpleMovingAverage(_sma2.Result, Len1); _sma4 = Indicators.SimpleMovingAverage(_sma3.Result, Len1); _sma5 = Indicators.SimpleMovingAverage(_sma4.Result, Len1); _sma6 = Indicators.SimpleMovingAverage(_sma5.Result, Len1); _sma7 = Indicators.SimpleMovingAverage(_sma6.Result, Len1); _sma8 = Indicators.SimpleMovingAverage(_sma7.Result, Len1); _sma9 = Indicators.SimpleMovingAverage(_sma8.Result, Len1); _sma10 = Indicators.SimpleMovingAverage(_sma9.Result, Len1); _ema1 = Indicators.ExponentialMovingAverage(iSeries1, Len3); _ema2 = Indicators.ExponentialMovingAverage(_ema1.Result, Len3); _ema3 = Indicators.ExponentialMovingAverage(ST2, Len3); _ema4 = Indicators.ExponentialMovingAverage(_ema3.Result, Len3); _ema5 = Indicators.ExponentialMovingAverage(iSeries1, Len4); _ema6 = Indicators.ExponentialMovingAverage(_ema3.Result, Len4); }
private void InitializeIndicators(TimeFrame tf) { lmm50[tf] = new Dictionary <string, ExponentialMovingAverage>(); lmm200[tf] = new Dictionary <string, WeightedMovingAverage>(); rmm200[tf] = new Dictionary <string, WeightedMovingAverage>(); lmacd[tf] = new Dictionary <string, MacdCrossOver>(); rmacd[tf] = new Dictionary <string, MacdCrossOver>(); rseries[tf] = new Dictionary <string, MarketSeries>(); lseries[tf] = new Dictionary <string, MarketSeries>(); foreach (var sym in symbols) { Print("Initializing data for: {0}/{1}.", sym, tf); var reftf = GetReferenceTimeFrame(tf); var lmks = MarketData.GetSeries(sym, tf); var rmks = MarketData.GetSeries(sym, reftf); lmm50[tf][sym] = Indicators.ExponentialMovingAverage(lmks.Close, 50); lmm200[tf][sym] = Indicators.WeightedMovingAverage(lmks.Close, 200); rmm200[tf][sym] = Indicators.WeightedMovingAverage(rmks.Close, 200); lmacd[tf][sym] = Indicators.MacdCrossOver(lmks.Close, 26, 12, 9); rmacd[tf][sym] = Indicators.MacdCrossOver(rmks.Close, 26, 12, 9); lseries[tf][sym] = lmks; rseries[tf][sym] = rmks; } }
protected override void Initialize() { if (EnableATRInfo) { atr = Indicators.AverageTrueRange(14, MovingAverageType.Exponential); } if (EnableD1) { seriesD1 = MarketData.GetSeries(TimeFrame.Daily); macdD1 = Indicators.MacdCrossOver(seriesD1.Close, 26, 12, 9); mmD1 = Indicators.ExponentialMovingAverage(seriesD1.Close, 200); } if (EnableH4) { seriesH4 = MarketData.GetSeries(TimeFrame.Hour4); macdH4 = Indicators.MacdCrossOver(seriesH4.Close, 26, 12, 9); mmH4 = Indicators.ExponentialMovingAverage(seriesH4.Close, 200); } if (EnableH1) { seriesH1 = MarketData.GetSeries(TimeFrame.Hour); macdH1 = Indicators.MacdCrossOver(seriesH1.Close, 26, 12, 9); mmH1 = Indicators.ExponentialMovingAverage(seriesH1.Close, 200); } if (EnableM5) { seriesM5 = MarketData.GetSeries(TimeFrame.Minute5); macdM5 = Indicators.MacdCrossOver(seriesM5.Close, 26, 12, 9); mmM5 = Indicators.ExponentialMovingAverage(seriesM5.Close, 200); } }
protected override void Initialize() { Enum.TryParse(upColor, out UpColor); Enum.TryParse(dnColor, out DnColor); EMA = Indicators.ExponentialMovingAverage(MarketSeries.Close, Period); Mac = Indicators.MacdHistogram(LongCycle, ShrtCycle, Signal); }
protected override void OnStart() { macd = Indicators.MacdHistogram(MarketSeries.Close, 26, 12, 9); ema = Indicators.ExponentialMovingAverage(MarketSeries.Close, 20); moneyManager = MoneyManagerFactory.Create(Account, this, (MoneyManagerType)MoneyManagerType, OneDayMaxLoss, Lots, Risk); label = Symbol.Code + "Five"; }
protected override void OnStart() { i_EMA = Indicators.ExponentialMovingAverage(MarketSeries.Close, (int)_EMA_Period); i_Last_EMA2 = Indicators.SimpleMovingAverage(MarketSeries.Close, 14); i_Current_EMA2 = Indicators.SimpleMovingAverage(MarketSeries.Close, 14); i_Current_EMA = Indicators.SimpleMovingAverage(MarketSeries.Close, 14); i_Last_EMA = Indicators.SimpleMovingAverage(MarketSeries.Close, 14); }
public override void Initialize() { //initialize this entry module emaslow = Indicators.ExponentialMovingAverage(slowperiod, Agent.Stream); emafast = Indicators.ExponentialMovingAverage(fastperiod, Agent.Stream); AddStream(SecurityType.Forex, "AUDJPY", BarInterval.Hour); }
protected override void OnStart() { state = new State(TFrame); lseries = new Dictionary <string, MarketSeries>(); rseries = new Dictionary <string, MarketSeries>(); lmm6 = new Dictionary <string, ExponentialMovingAverage>(); lmm18 = new Dictionary <string, ExponentialMovingAverage>(); lmm50 = new Dictionary <string, ExponentialMovingAverage>(); lmm100 = new Dictionary <string, ExponentialMovingAverage>(); rmm100 = new Dictionary <string, ExponentialMovingAverage>(); lmm200 = new Dictionary <string, SimpleMovingAverage>(); rmm200 = new Dictionary <string, SimpleMovingAverage>(); lmacd = new Dictionary <string, MacdCrossOver>(); rmacd = new Dictionary <string, MacdCrossOver>(); spaths = new Dictionary <string, string>(3); spaths.Add("MACD", "C:\\Users\\Andrey\\Music\\Sounds\\sms-alert-1.wav"); spaths.Add("ACC", "C:\\Users\\Andrey\\Music\\Sounds\\sms-alert-4.wav"); spaths.Add("VCN", "C:\\Users\\Andrey\\Music\\Sounds\\sms-alert-3.wav"); Print("Initializing screener local state."); foreach (var sym in symbols) { Print("Initializing data for: {0}/{1}.", sym, TFrame); var reftf = GetReferenceTimeframe(TFrame); var lmks = MarketData.GetSeries(sym, TFrame); var rmks = MarketData.GetSeries(sym, reftf); lmm6[sym] = Indicators.ExponentialMovingAverage(lmks.Close, 6); lmm18[sym] = Indicators.ExponentialMovingAverage(lmks.Close, 18); lmm50[sym] = Indicators.ExponentialMovingAverage(lmks.Close, 50); lmm100[sym] = Indicators.ExponentialMovingAverage(lmks.Close, 100); rmm100[sym] = Indicators.ExponentialMovingAverage(rmks.Close, 100); lmm200[sym] = Indicators.SimpleMovingAverage(lmks.Close, 200); rmm200[sym] = Indicators.SimpleMovingAverage(rmks.Close, 200); lmacd[sym] = Indicators.MacdCrossOver(lmks.Close, 26, 12, 9); rmacd[sym] = Indicators.MacdCrossOver(rmks.Close, 26, 12, 9); lseries[sym] = lmks; rseries[sym] = rmks; } Print("Initialization finished."); var output = state.Render(); ChartObjects.RemoveObject("screener"); ChartObjects.DrawText("screener", output, StaticPosition.TopLeft, Colors.Black); }
protected override void Initialize() { // Initialize and create nested indicators accDist = CreateDataSeries(); ema3 = Indicators.ExponentialMovingAverage(accDist, 3); ema10 = Indicators.ExponentialMovingAverage(accDist, 10); marketSeriesDaily = MarketData.GetSeries(TimeFrame.Daily); }
protected override void OnStart() { i_MACD_main = Indicators.MacdHistogram(MarketSeries.Close, (int)_Period_SlowEMA, (int)_Period_FastEMA, (int)_Period_MACD_SMA); i_MCAD_signal = Indicators.MacdHistogram(MarketSeries.Close, (int)_Period_SlowEMA, (int)_Period_FastEMA, (int)_Period_MACD_SMA); i_MA_Close = Indicators.SimpleMovingAverage(MarketSeries.Close, 1); i_Parabolic_SAR = Indicators.ParabolicSAR(_Step_PrbSAR, 0.1); i_MA_Open = Indicators.SimpleMovingAverage(MarketSeries.Open, 1); i_EMAf = Indicators.ExponentialMovingAverage(MarketSeries.Close, (int)_Period_FastEMA); }
protected override void OnStart() { cBotLabel = "ADXR " + Symbol.Code + " " + TimeFrame.ToString(); _adx = Indicators.GetIndicator <ADXR>(Source, interval); _emaFast = Indicators.ExponentialMovingAverage(Price, FastPeriods); Positions.Opened += PositionsOnOpened; Positions.Closed += PositionsOnClosed; }
protected override void Initialize() { ema1 = Indicators.ExponentialMovingAverage(Source, Period); ema2 = Indicators.ExponentialMovingAverage(ema1.Result, Period); ema3 = Indicators.ExponentialMovingAverage(ema2.Result, Period); ema4 = Indicators.ExponentialMovingAverage(ema3.Result, Period); ema5 = Indicators.ExponentialMovingAverage(ema4.Result, Period); ema6 = Indicators.ExponentialMovingAverage(ema5.Result, Period); }
/// <summary> /// Viene generato all'avvio dell'indicatore, si inizializza l'indicatore /// </summary> protected override void Initialize() { // --> Stampo nei log la versione corrente Print("{0} : {1}", NAME, VERSION); _ma = Indicators.MovingAverage(Source, MAPeriods, MaType); _rsi = Indicators.RelativeStrengthIndex(_ma.Result, RSIPeriods); _ema = Indicators.ExponentialMovingAverage(_rsi.Result, TPeriods); }
protected override void OnTick() { ExponentialMovingAverage EMA20 = Indicators.ExponentialMovingAverage(null, 20); EMA20.Calculate(0); int x = EMA20.Result; x = x; }
protected override void OnStart() { _macd = Indicators.MacdHistogram(LongCycle, ShortCycle, Period); _emaFast = Indicators.ExponentialMovingAverage(Price, FastPeriods); _adx = Indicators.GetIndicator <ADXR>(Source, interval); _cci = Indicators.GetIndicator <CCI>(CCI_period); _heiken = Indicators.GetIndicator <HeikenAshi2>(1); _emasignal = Indicators.GetIndicator <ExponentialSignal>(EMAPeriod); }
protected override void Initialize() { series1 = MarketData.GetSeries(EMATimeframe1); series2 = MarketData.GetSeries(EMATimeframe2); series3 = MarketData.GetSeries(EMATimeframe3); Ema1 = Indicators.ExponentialMovingAverage(series1.Close, Periods); Ema2 = Indicators.ExponentialMovingAverage(series2.Close, Periods); Ema3 = Indicators.ExponentialMovingAverage(series3.Close, Periods); }
protected override void OnStart() { dc1 = Indicators.DonchianChannel(dcPeriod1); dc2 = Indicators.DonchianChannel(dcPeriod2); ema1 = Indicators.ExponentialMovingAverage(MarketSeries.Close, emaPeriod1); ema2 = Indicators.ExponentialMovingAverage(MarketSeries.Close, emaPeriod2); atr = Indicators.AverageTrueRange(atrPeriod, MovingAverageType.Exponential); }
protected override void OnStart() { _botName = ToString(); _instanceLabel = string.Format("{0}-{1}-{2}-{3}-{4}", _botName, _botVersion, Symbol.Code, TimeFrame.ToString(), GlobalTimeFrame.ToString()); tendency = Indicators.GetIndicator <CandlestickTendencyII>(GlobalTimeFrame, MinimumGlobalCandleSize); _macd = Indicators.MacdHistogram(LongCycle, ShortCycle, Period); _emaFast = Indicators.ExponentialMovingAverage(Price, FastPeriods); _adx = Indicators.GetIndicator <ADXR>(Source, interval); _cci = Indicators.GetIndicator <CCI>(CCI_period); _heiken = Indicators.GetIndicator <HeikenAshi2>(1); }
protected override void Initialize() { _dixPowerDigits = Math.Pow(10, Symbol.Digits); i_MACD_Histogram = Indicators.MacdHistogram(MarketSeries.Close, Period_SlowEMA, Period_FastEMA, Period_MACD_SMA); i_MCAD_signal = Indicators.MacdHistogram(MarketSeries.Close, Period_SlowEMA, Period_FastEMA, Period_MACD_SMA); // i_MA_Close = Indicators.SimpleMovingAverage(MarketSeries.Close, 1); i_Parabolic_SAR = Indicators.ParabolicSAR(Step_PrbSAR, 0.1); i_MA_Open = Indicators.SimpleMovingAverage(MarketSeries.Open, 1); i_EMAf = Indicators.ExponentialMovingAverage(MarketSeries.Close, Period_FastEMA); }
protected override void OnStart() { Positions.Closed += OnClosePosition; longAverage = Indicators.ExponentialMovingAverage(MarketSeries.Close, LongPeriods); shortAverage = Indicators.ExponentialMovingAverage(MarketSeries.Close, ShortPeriods); bollingerBands = Indicators.BollingerBands(MarketSeries.Close, BollingerPeriods, 2, MovingAverageType.Exponential); tradeVolumeIndex = Indicators.TradeVolumeIndex(MarketSeries.Close); base.OnStart(); }
protected override void Initialize() { CO_Series = CreateDataSeries(); HL_Series = CreateDataSeries(); EMA_CO = Indicators.ExponentialMovingAverage(CO_Series, Interval_1); EMA_CO_S = Indicators.ExponentialMovingAverage(EMA_CO.Result, Interval_2); EMA_HL = Indicators.ExponentialMovingAverage(HL_Series, Interval_1); EMA_HL_S = Indicators.ExponentialMovingAverage(EMA_HL.Result, Interval_2); }
protected override void OnStart() { bars = Source.Count; macd = Indicators.GetIndicator <ZeroLagMacd>(26, 12, 9); mm8 = Indicators.ExponentialMovingAverage(Source, 8); mm50 = Indicators.WeightedMovingAverage(Source, 50); mm150 = Indicators.WeightedMovingAverage(Source, 150); mm300 = Indicators.WeightedMovingAverage(Source, 300); Positions.Closed += PositionsOnClosed; }
/// <summary> /// Viene generato all'avvio dell'indicatore, si inizializza l'indicatore /// </summary> protected override void Initialize() { // --> Stampo nei log la versione corrente Print("{0} : {1}", NAME, VERSION); // --> Se viene settato l'ID effettua un controllo per verificare eventuali aggiornamenti _checkProductUpdate(); _ma = Indicators.MovingAverage(Source, MAPeriods, MaType); _rsi = Indicators.RelativeStrengthIndex(_ma.Result, RSIPeriods); _ema = Indicators.ExponentialMovingAverage(_rsi.Result, TPeriods); }