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

Adding Multiple Instruments to an Indicator

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

    Adding Multiple Instruments to an Indicator

    Hi

    I am attempting to create an indicator that gives me the total volume of all members of the Dow 30 on a single chart of the DJIA index.

    I'm attempting to use Add("<Instrument>", PeriodType.Minute, 1); were <instrument> would be an individual stock. But when I try to Compile it, it gives a message, "No overload for method 'Add' takes '3' arguments": And the error code is; CS1501.

    Even if I cut-and-paste the example straight from the NT user manual, I still get this message. Can someone please tell me what I'm doing wrong here?

    The following is a sample from the manual:

    Examples
    protected override void Initialize()
    {
    // Add a 5 minute Bars object - BarsInProgress index = 1
    Add(PeriodType.Minute, 5);
    // Add a 100 tick Bars object for the ES 12-06 contract - BarsInProgress index = 2
    Add("ES 12-06", PeriodType.Tick, 100);

    // Charts a 20 period simple moving average to the chart
    Add(SMA(20));
    }

    But If I try to use any of the examples, it won't compile



    Yam Digger
    Last edited by yamdigger; 09-10-2008, 11:59 AM.

    #2
    Multi-instrument indicators are currently not available. They will be in NT7 though.

    The line of code you are attempting only works in NinjaScript Strategies. Some people have had success using a Strategy to mimic an indicator. Here is an example of how to do this: http://www.ninjatrader-support.com/v...ead.php?t=6651

    It is not perfect but it is a workaround. The solution is provided as-is though and we cannot offer support for it.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Is there an estimated release (beta) date for NT7?

      Comment


        #4
        Beta end of this year.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by gravdigaz6, Today, 11:40 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by MarianApalaghiei, Today, 10:49 PM
        3 responses
        10 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by XXtrader, Today, 11:30 PM
        0 responses
        4 views
        0 likes
        Last Post XXtrader  
        Started by love2code2trade, Yesterday, 01:45 PM
        4 responses
        28 views
        0 likes
        Last Post love2code2trade  
        Started by funk10101, Today, 09:43 PM
        0 responses
        9 views
        0 likes
        Last Post funk10101  
        Working...
        X