Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Add ( ) with range bars

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

    Add ( ) with range bars

    Good Evening everyone,

    Here's my issue,
    I'm attempting to add multiple time frames to my strategy, using the Add() method. I want to add multiple range bar time frames.
    I'm typing Add (PeriodType.Range, 15);
    I then get an error message stating NinjaTrader.Data.PeriodType does not contain a definition for 'range.' Error type CS0117

    I checked the error code but didn't find much help when it came to range bars.

    Any help would be greatly appreciated.

    #2
    Originally posted by Kmdom3 View Post
    Good Evening everyone,

    Here's my issue,
    I'm attempting to add multiple time frames to my strategy, using the Add() method. I want to add multiple range bar time frames.
    I'm typing Add (PeriodType.Range, 15);
    I then get an error message stating NinjaTrader.Data.PeriodType does not contain a definition for 'range.' Error type CS0117

    I checked the error code but didn't find much help when it came to range bars.

    Any help would be greatly appreciated.
    Are you sure you are adding PeriodType.Range and not PeriodType.range?
    C# is case sensitive.

    Comment


      #3
      Originally posted by roonius View Post
      Are you sure you are adding PeriodType.Range and not PeriodType.range?
      C# is case sensitive.
      I actually tried both, realizing that C# is case-sensitive, and neither worked.

      Comment


        #4
        If you do:

        Add(PeriodType.Minute, 1);

        does that work? What about tick? ie: Add(PeriodType.Tick, 233);

        Let's establish you have those working, if it is just Range that is a problem, or if none of the above are working.

        Also, what period type are you using to run the actual strategy on (if running on a chart, what time period, or if backtesting, what time period) ie minute, tick, range?

        Mike

        Comment


          #5
          Kmdom3,

          This worked for me.

          Add(PeriodType.Range, 15);

          When you type the following... Add(PeriodType.

          you should see an intellisense pop-up with period type selection. Double click on Range. Finish the line of code and compile.

          Good Luck,

          RJay
          RJay
          NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

          Comment


            #6
            Thanks, turns out it was simple as removing the space between Add(), I'm used to C++, where spaces didn't matter.
            Sorry for wasting your time with that inane question, appreciate everybody's help.
            Last edited by Kmdom3; 05-10-2009, 07:25 PM. Reason: add a footnote

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            633 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            364 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            105 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            567 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            568 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X