PDA

View Full Version : barsago error


Jim-Boulder
10-18-2007, 01:25 PM
I have a strtaegy that has(had) a variable called barsAgo, I renamed it bbarsAgo as I will explain shortly.

for some reason, I get the following error in the LOG when I run this strategy. Note that I get NO compile errors.

Error on calling 'OnBarUpdate' method for strategy 'AutoCOMASPers': ADX[barsAgo]: barsAgo must be greater/equal 0 but was -1

Note: I do not refer or use the ADX indicator at all in this strategy. To try to resolve this issue, I have tried renaming my variable to bbarsAgo--just in the off chance of the ADX method was attempting to use my variable.


In my strategy, I am assigning the value of 'bbarsago' from the MRO method--which can and does often result in a value of -1 (which is a valid value in this method)

Is this a case of some other error causing this error? ANy help would be appreciated.

NinjaTrader_Dierk
10-18-2007, 02:17 PM
Likely related to that thread: http://www.ninjatrader-support.com/vb/showthread.php?t=3170