Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 Shansen, 08-30-2019, 10:18 PM
            24 responses
            941 views
            0 likes
            Last Post spwizard  
            Started by Max238, Today, 01:28 AM
            0 responses
            9 views
            0 likes
            Last Post Max238
            by Max238
             
            Started by rocketman7, Today, 01:00 AM
            0 responses
            4 views
            0 likes
            Last Post rocketman7  
            Started by wzgy0920, 04-20-2024, 06:09 PM
            2 responses
            28 views
            0 likes
            Last Post wzgy0920  
            Started by wzgy0920, 02-22-2024, 01:11 AM
            5 responses
            33 views
            0 likes
            Last Post wzgy0920  
            Working...
            X