/// <summary> /// Initialization method /// </summary> public override void OnInitialize() { log.Debug("CerseiStrategy onInitialize()"); // Adding a ROCR 100 indicator to strategy // (see http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:price_oscillators) rocr100Indicator = new ROCR100Indicator(Bars.Close, (int)this.GetInputParameter("ROCR 100 Period")); this.AddIndicator("ROCR 100 indicator", rocr100Indicator); // Setting the initial acceleration for the trailing stop acceleration = 0.02; // Setting the initial highest close highestClose = 0.0; }
/// <summary> /// Initialization method /// </summary> public override void OnInitialize() { log.Debug("CerseiStrategy onInitialize()"); // Adding a ROCR 100 indicator to strategy // (see http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:price_oscillators) rocr100Indicator = new ROCR100Indicator(Bars.Close, (int)this.GetInputParameter("ROCR 100 Period")); this.AddIndicator("ROCR 100 indicator", rocr100Indicator); // Setting the initial acceleration for the trailing stop acceleration = 0.02m; // Setting the initial highest close highestClose = 0m; }