Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtest screen blank when referencing BarsArray

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

    Backtest screen blank when referencing BarsArray

    The following code snipit complies in a strategy with out errors but then causes the Backtest pop-up dialog to come up empty - actually blank. Can you help me out here? Thanks.

    Add(PeriodType.Minute, 30);

    myWMA5 = WMA(BarsArray[1],5);
    myWMA5.Plots[0].Pen = new Pen(Color.DarkBlue,2);
    Add(myWMA5);

    Without the reference to BarsArray in the WMA declaration it works fine.
    Last edited by kgillis23; 05-24-2007, 04:08 PM.

    #2
    Yes, you have hit a limitation by where you can not assign a secondary series to an indicator method in the Initialize() method. If you check your log, I suspect you will see an error message regarding this.

    We do not support plotting indciators of a different series on the primary chart series that the strategy is running on.
    RayNinjaTrader Customer Service

    Comment


      #3
      Thanks,

      Ok, so while backtesting I want to plot multiple WMA on 30 minute bars while running a strategy based on 5 minute bars (i.e. I need to enter/exit on 5 minute intervals and not wait for the 30 minute bar to update).

      So, how can I plot on 30m when my enter/exit or on 5m?

      Or do I need to write my own WMA for the 30m?

      Comment


        #4
        See below.

        Originally posted by kgillis23 View Post
        Thanks,

        Ok, so while backtesting I want to plot multiple WMA on 30 minute bars while running a strategy based on 5 minute bars (i.e. I need to enter/exit on 5 minute intervals and not wait for the 30 minute bar to update).

        >>> You can not plot indicators using the 30 minute time frame if you backtesting primary series is done on a 5 minute bar.

        So, how can I plot on 30m when my enter/exit or on 5m?
        >>> You can't at this time, this is a limitation.

        Or do I need to write my own WMA for the 30m?
        RayNinjaTrader Customer Service

        Comment


          #5
          So, just so I understand, I can still use the value of a 30 minute WMA(5) in a strategy charting and running on 5 minutes, I just can't chart the 30 minute indiators. Is that right?

          Comment


            #6
            Your understanding is dead on.
            RayNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            561 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            325 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
            547 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