NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 07-19-2011, 05:37 PM   #1
trtrav
Junior Member
 
Join Date: May 2011
Posts: 11
Thanks: 0
Thanked 0 times in 0 posts
Default bar out of valid range

I have an indicator that uses DrawArrowDown. It works fine most of the time but occasionally runs into an error:
DrawArrowDown: bar out of valid range 0 through -1 was 0.
If I close the chart and create a new chart it usually goes away.
Any ideas on how I could handle this?
I have put all the suggested:
Code:
if (CurrentBar < 1) return;
type checks but this doesn't seem to be the problem. The valid bar range from the error says 0 through -1 and I am always using 0 (current bar).

Thanks
trtrav is offline  
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop orders only valid for one bar? BillyRayValentine Strategy Development 3 11-06-2010 12:26 PM
Value outside of valid range error in beta22 sbgtrading Version 7 Beta General Questions & Bug Reports 2 10-19-2010 04:43 PM
DrawText: startBarsAgo out of valid range Sleeping Troll Indicator Development 2 03-16-2010 07:15 AM
Bar out of valid range 0 through -1, was 0 Zapzap General Programming 6 10-17-2008 12:17 AM
I want a "Cross" condition to be valid for more than one bar NinjaTrader_Ray General Programming 2 11-26-2007 09:27 PM


All times are GMT -6. The time now is 07:04 PM.