i want to develop a very simple indicator that will look back at the last n periods (let's say 500), determine the highest high for the symbol we are evaluating over this time period and draw a continuous horizontal line at that value (the highest high of the last n periods).
i received some invaluable assistance from other users and this is how the code for this indicator looks like in nt7:
protected override void OnBarUpdate() { highs.Add(High[0]); if(highs.Count > period) double high = highs.Skip(highs.Count-period).Take(period).Max(); DrawLine("highesthigh"+CurrentBar,false,1,high,0,high,Color.Silver,DashStyle.Solid,4); }
thanks, regards.
Comment