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 cmoran13, Yesterday, 01:02 PM
      0 responses
      30 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      22 views
      0 likes
      Last Post PaulMohn  
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      160 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      95 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      148 views
      2 likes
      Last Post CaptainJack  
      Working...
      X