Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi Range Strategy Question

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

    Multi Range Strategy Question

    NT,

    I want to see 4 lines plotted on my 2 Tick Range Chart.
    Here is the code so far.
    -----------------------------------------------------------------------

    protectedoverridevoid Initialize()

    {

    Add("", PeriodType.Range , 4);
    Add("", PeriodType.Range , 6);
    Add("", PeriodType.Range , 8);


    Add(TRIXoverlayGreen(3, 4.5, 3.75));
    Add(TRIXoverlayGreen(BarsArray[1],3, 4.5, 3.75));
    Add(TRIXoverlayGreen(BarsArray[2],3, 4.5, 3.75));
    Add(TRIXoverlayGreen(BarsArray[3],3, 4.5, 3.75));

    CalculateOnBarClose = true;

    }

    ///<summary>
    /// Called on each bar update event (incoming tick)
    ///</summary>

    protectedoverridevoid OnBarUpdate()

    {

    if (BarsInProgress == 0)

    {
    // Do Something
    }

    if (BarsInProgress == 1)

    {
    // Do Something
    }

    if (BarsInProgress == 2)

    {
    // Do Something
    }

    if (BarsInProgress == 3)

    {
    // Do Something
    }

    --------------------------------------------------------------
    Is it possible to plot these 4 lines on the same chart through this strategy?

    What needs to be added to each "bar in progress" make this happen?

    Thanks,

    RJay
    RJay
    NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

    #2
    Add("", PeriodType.Range , 4);
    Add("", PeriodType.Range , 6);
    Add("", PeriodType.Range , 8);

    You need to type in a symbol name to add those symbols. If you just want whatever is selected by the chart, remove that parameter.

    You cannot plot other series' data onto the primary time frame.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      I was looking for a solution to my problem, which is I cannot get my indicator to compile with the following line of code in the initialize section:

      Add(PeriodType.Range, 9);

      I get a "No overload for method 'Add' takes '2' arguments" error message. Noticed there was another thread regarding this specific problem, but the solution was unclear to me - something about removing spaces??

      Regardless, what I want to do is plot a channel on my chart (same symbol, different bar type and timeframe) using range bar data. However, I see from Josh's reply to a previous post that "You cannot plot other series' data..." onto a chart, if I understand correctly. Is this still the case and will it change in NT7?

      Thanks!


      Originally posted by NinjaTrader_Josh View Post
      Add("", PeriodType.Range , 4);
      Add("", PeriodType.Range , 6);
      Add("", PeriodType.Range , 8);

      You need to type in a symbol name to add those symbols. If you just want whatever is selected by the chart, remove that parameter.

      You cannot plot other series' data onto the primary time frame.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      558 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X