oldredtop
05-16-2011, 04:03 PM
I'm trying to code a very simple strategy that uses the basic SuperTrend indicator that I believe came with NT7. I keep getting a compiler error "NinjaTrader.Indicator.SuperTrend.Trend is inaccessible due to it's protection level". Any idea what this error points too?
Based on Google research (and reading the entire 24 page SuperTrend thread :eek:), I suspect it may be something to do with the overload syntax, but I am not enough of a programmer to be sure. Trend does exist as a bool series in the SuperTrend indicator code. Here is the the code line that generates the compiler error listed above...
if (!SuperTrend(14, 2.66, true).Trend[0] && SuperTrend(14, 2.66, true).Trend[1])
If any one can help me see the error of my ways, it would be greatly appreciated..http://www.ninjatrader.com/support/forum/images/smilies/wink.png
Thanks in advance.
Based on Google research (and reading the entire 24 page SuperTrend thread :eek:), I suspect it may be something to do with the overload syntax, but I am not enough of a programmer to be sure. Trend does exist as a bool series in the SuperTrend indicator code. Here is the the code line that generates the compiler error listed above...
if (!SuperTrend(14, 2.66, true).Trend[0] && SuperTrend(14, 2.66, true).Trend[1])
If any one can help me see the error of my ways, it would be greatly appreciated..http://www.ninjatrader.com/support/forum/images/smilies/wink.png
Thanks in advance.