Thanks again to Jesse at NT Support for helping me solve the technical problem in opening NT, for which I started a thread at:
What obviously caused the problem (as Jesse suspected) was one of my indicators that included this code:
int dist = 0; if (CurrentBar < LookBack) return; for (int i = -1; i < LookBack; i--) { if(MAX(High, i)[-1] < High[0]) { continue; } else dist = i; break; } Plot0.Set(dist); }
What I’m (fairly obviously) trying to achieve with the above code and the negative arguments is to find the number of bars to the next bar at the same level (if there is one).
Overall, I'm trying to find where every bar stands in relation to the adjacent bars at the same level.
One way this might be achieved is to reverse the data series – if this is possible. Then when working on that, what is the ‘future’ in a normal series, becomes the ‘past’. I’ve tried hard to achieve this using various C# resources but haven’t got anywhere.
So any advice on how got the idea to work and/or how to reverse a data series will be much appreciated.
Comment