Below is a log of the period variable that goes into the EMA function, the Print() statement has been placed immediately before EMA().
6/6/2013 8:35:00 AM - Find Price Extreme RSI: Trend Period - 14
6/6/2013 3:25:00 AM - Find Price Extreme RSI: Trend Period - 0
Value of property 'Period' of NinjaScript 'SMA' is 0 and not in valid range between 1 and 2147483647.
Below is everywhere in code that this variable exists
[Range(1, int.MaxValue), NinjaScriptProperty] [Display(ResourceType = typeof(Custom.Resource), Name = "RSI Period", GroupName = "Identifying Price Strength", Order = 3)] public int RSIPeriod { get; set; }
Shortened for brevity
protected override void OnStateChange() { if (State == State.SetDefaults) { ... RSIPeriod = 14; ... } else if (State == State.Configure) { ... } }
Print(Time[0] + " - Find Price Extreme RSI: Trend Period - " + RSIPeriod); double previousRSI = RSI(BarsArray[2], RSIPeriod, RSISmooth).Avg[1];
Comment