public override void Initialise(StockSerie stockSerie, StockOrder lastBuyOrder, bool supportShortSelling) { base.Initialise(stockSerie, lastBuyOrder, supportShortSelling); this.SRTrailStop = stockSerie.GetTrailStop(trailName); this.adxDecorator = stockSerie.GetDecorator("DIV(1)", ((IStockIndicator)TriggerIndicator).Name); }
public _ADXStrategy() { this.TriggerIndicator = StockIndicatorManager.CreateIndicator(triggerName); adxIndicator = (IStockIndicator)this.TriggerIndicator; this.adxDecorator = StockDecoratorManager.CreateDecorator("DIV(1)", triggerName); exhaustionSellIndex = adxDecorator.EventNames.ToList().IndexOf("ExhaustionBottom"); this.SRTrailStop = StockTrailStopManager.CreateTrailStop(trailName); upTrendIndex = SRTrailStop.EventNames.ToList().IndexOf("UpTrend"); downTrendIndex = SRTrailStop.EventNames.ToList().IndexOf("DownTrend"); brokenUpEventIndex = SRTrailStop.EventNames.ToList().IndexOf("BrokenUp"); brokenDownEventIndex = SRTrailStop.EventNames.ToList().IndexOf("BrokenDown"); }
public DecoratorNode(string name, ContextMenuStrip menuStrip, IStockDecorator stockDecorator) : base(name, NodeType.Decorator, menuStrip, (IStockViewableSeries)stockDecorator) { this.ImageKey = "DECO"; this.SelectedImageKey = "DECO"; }
public MOMEXSimpleStrategy() { this.TriggerIndicator = StockDecoratorManager.CreateDecorator("DIV(2)", "BUYMOMEX(12,False,2)"); momex = (IStockDecorator)this.TriggerIndicator; }