PDA

View Full Version : Condition Builder - Time Comparison Error


davidfw1866
10-29-2007, 09:09 PM
In the Condition Builder, I am creating a time comparison that translates as follows:
"Current bar's time is greater than or equal to 1:20 PM"
http://www.image-upload.net/files/4335/conditionBuilder.jpg


However, when I attempt to generate the strategy, I get the following error:
http://www.image-upload.net/files/4335/error.jpg


I'm following the NinjaTrader Help files almost verbatim, so I don't understand why there's a problem.

Help!

NinjaTrader_Josh
10-29-2007, 10:14 PM
Right. A time series object is a DateTime object while a time value is only an integer. To correct for this you will need to change the code to this.
if (ToTime(Time[0]) >= ToTime(13, 20, 0))

davidfw1866
10-29-2007, 10:31 PM
Josh:

I appreciate the prompt reply; it really helped a lot.

In any case, the NinjaTrader Help explanation will have to be changed:

http://www.image-upload.net/files/4335/0001/errors.jpg

NinjaTrader_Josh
10-29-2007, 11:58 PM
Thanks for bringing this up. Will inform the development team.

NinjaTrader_Dierk
10-30-2007, 07:16 AM
This issue will be resolved with next update of NT6. Thanks for bringing this up.