Hi anachronist. At this point, your code I transformed as follows:
I can not understand what the problem is the last line after "else" (CS1502 and CS1503). I tried to replace lines.RemoveAll(ld) in lines.Remove(ld). The indicator is compiled, but when you add the indicator ninja crash.
I have it compiled without any conditions "else". The lines ended on the next bar. So I changed to zero -90 000, so they went further to the right.
Last edited by doitagaitforme; May 3rd, 2012 at 08:18 AM.
OK, here's what I came up with, now that I got a chance to test it myself.
Warning, if you try to run this on too much data, NinjaTrader will appear to freeze up, because it adds a new line on every single bar (each new close). I'd keep it under 1000 bars.
I suspected that there might be a problem with removing elements from a list during a loop traversing that same list, so instead I collected the elements to remove in another list for cleanup outside the first loop.
And here's a picture:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).
Last edited by anachronist; May 3rd, 2012 at 06:43 PM.
The following 3 users say Thank You to anachronist for this post: