protected override void OnStart() { base.OnStart(); botLabel = string.Format("{0}-{1} {2}", botPrefix, Symbol.Code, TimeFrame); Print(this.botName()); wpr = Indicators.GetIndicator <WilliamsPercentRange>(wprSource, wprPeriod, wprOverbuyCeil, wprOversellCeil, WprMagicNumber, wprMinMaxPeriod, wprExceedMinMax); // ZigZag Kwan MBFX Timing ou Beta zigzagKwanMBFXTiming = Indicators.GetIndicator <ZigzagKwanMBFXTiming>(mbfxLen, mbfxFilter); zigZag = Indicators.GetIndicator <ZigZag>(ZzDepth, ZzDeviation, ZzBackStep); trendMagic = Indicators.GetIndicator <TrendMagic>(TMCciPeriod, TMAtrPeriod); _cci = Indicators.CommodityChannelIndex(TMCciPeriod); Positions.Opened += OnPositionOpened; Positions.Closed += OnPositionClosed; }
/// <summary> /// CALLED WHEN THE ROBOT FIRST STARTS, IT IS ONLY CALLED ONCE. /// </summary> protected override void OnStart() { // TRADE MANAGER DECLERATION //tm = new TradeManager(this); // INSTANTIATE THE INDICATORS //VindIchi = Indicators.IchimokuKinkoHyo(9, KijunSen, 52); // AVERAGE TRUE RANGE Vatr = Indicators.AverageTrueRange(ATRPeriod, MovingAverageType.Simple); // CUSTOM INDICATORS // AROON OSCILLATOR Vao = Indicators.GetIndicator <AroonOscilator>(ArroonPeriod); // HULL FORECAST Vhfc = Indicators.GetIndicator <HullForcast>(HFPeriod, HFCPeriod, MarketSeries.Close, false, ""); // INCORRECT NUMBER OF PARAMATERS // RATE OF CHANGE Vroc = Indicators.GetIndicator <RateOfChange>(MarketSeries.Close, ROCPeriod); // TREND MAGIC Vtm = Indicators.GetIndicator <TrendMagic>(TMCCI, TMATR); // TRUE STRENGTH INDEX Vtsi = Indicators.GetIndicator <TSI>(MarketSeries.Close, TSIShortPeriod, TSILongPeriod, TSISignalPeriod, MovingAverageType.Weighted); }