I have a custom overlay indicator which in total contains 15 equidistant plots on the chart.
In my indicator logic I have an array which holds the CurrentBar value when each plot was passed through by price action. Like so...
int[] barHits = { Yminus7Hit, Yminus6Hit, Yminus5Hit, Yminus4Hit, Yminus3Hit, Yminus2Hit, Yminus1Hit, YHit, Yplus1Hit, Yplus2Hit, Yplus3Hit, Yplus4Hit, Yplus5Hit, Yplus6Hit, Yplus7Hit }; Array.Sort(barHits); Array.Reverse(barHits);
if (High[0] >= plot && Low[0] <= plot
I am trying to create a List<T> such that the elements represent the currentbar value of a plot being hit, and which plot this was. But I am having trouble because when I say...
if (High[0] >= plot && Low[0] <= plot) { hitCache.Add(plot, currentbar); }
I hope my goal is clear here, and adequately explained. The final product would essentially be the same information that setting an MRO method for each individual plot would give me, only I would be holding each instance in the same list ( I do plan to add a List.Remove function when the list gets to a certain size, beyond which the instance is no longer useful).
Thanks in advance, love you all.
Comment