Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi Instrument not woking in NT 7.0.1000.40

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

    Multi Instrument not woking in NT 7.0.1000.40

    I had this example indicator working perfectly in a previous version of NT, but when I updated to version 7.0.1000.40 it stopped working.
    Any clues?

    protected override void Initialize()
    {
    Add("ES 06-19", PeriodType.Tick, 610);
    Add("NQ 06-19", PeriodType.Tick, 337);
    Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));
    Overlay = false;
    }

    protected override void OnBarUpdate()
    {
    ES=BarsArray[1][0];
    NQ=BarsArray[2][0];
    Plot0.Set(ES-NQ);
    }

    #2
    Hello Capablanca,

    Thanks for your post.

    Do you see any error messages in the "log" tab of the control center when you apply the indicator?

    Your code example does not show you checking to make sure that you have bars available before starting to plot/calculate. Typically this would be done by checking the CurrentBars[n] where [n] is the related BarsArray. The chart Bars would be [0], ES 06-19 would be [1] and NQ 06-19 would be [2] so that the top of OnBarUpdate() I would expect to see a check like:

    if (CurrentBars[0] < 1 || CurrentBars[1] < 1 || CurrentBars [2] < 1) return; // do not process until we have at least one bar of each

    Comment


      #3
      Indeed that was my error.
      I hadn't used that bars count in my previous indicators and for some reason they had worked.

      Thank you for the support.

      Comment


        #4
        Hello,
        I want to post my question here as its referring to this topic in NT7.
        I add in Initialize the instruments as here in #1 with Add("NQ 06-19", PeriodType.Minute, 1); Add("YM 06-19", PeriodType.Minute, 1); Add("CL 07-19", PeriodType.Minute, 1);Add("GC 08-19", PeriodType.Minute, 1);
        and in onbarupdate I have
        EnterShort(1, 1, "NQShort");
        EnterShort(2, 1, "YMShort");
        EnterShort(3, 1, "CLShort");
        EnterLong(4, 1, "GCLong");

        but it only enters NQ and GC.

        //I have EntriesPerDirection = 4; EntryHandling = EntryHandling.AllEntries

        Why doesnt the script entershort YM and CL?

        Thank you!
        Tony
        Last edited by tonynt; 06-11-2019, 03:51 AM. Reason: translation error

        Comment


          #5
          Hello tonynt,

          Thanks for your post.

          You also wrote in to Platformsupport on the very same question which we prefer that you either post in the forum or write in but not both as this creates twice the work for the same answer.

          Testing on my end you would want to set EntriesPerDirection to 1 and EntryHandling to UniqueEntries as this uses the signal names.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          553 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
          100 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          543 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          546 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X