• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Value out of range, why ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Value out of range, why ?

    Hello everybody,

    I have this error (you can see the picture), but I wrote as always :

    Code:
    if (CurrentBar>100) {
    
    Code
    
    }
    So it's really strange.

    The point is the indicator is multi-timeframe. It uses a daily timeframe too as you can see. I think this is the reason.

    How to fix this ?

    Thanks a lot !
    Attached Files

    #2
    Hello After,

    You need to check the bars for the other DataSeries as well like below -

    if(CurrentBars[0] < 100 || CurrentBars[1] < 1) return;

    http://www.ninjatrader.com/support/h...urrentbars.htm

    Let me know if I can be of further assistance.
    Cal H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Louis335, Today, 02:37 AM
    0 responses
    1 view
    0 likes
    Last Post Louis335  
    Started by wehjosu, Today, 02:36 AM
    0 responses
    1 view
    0 likes
    Last Post wehjosu
    by wehjosu
     
    Started by UltraNIX, Today, 01:43 AM
    0 responses
    9 views
    0 likes
    Last Post UltraNIX  
    Started by leodrz, Yesterday, 09:45 PM
    2 responses
    14 views
    0 likes
    Last Post leodrz
    by leodrz
     
    Started by habibalex, Yesterday, 09:30 PM
    0 responses
    8 views
    0 likes
    Last Post habibalex  
    Working...
    X