Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Swing Indicator NT8

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

    #16
    Hello Mukaddim,

    Thanks for your reply.

    We do not recommend or support dynamic instrument assignments. Your MTF would need to be hard coded for the time frames to use. I don't know if this would be an option but you could add all of the time frames of interest and then in the code use bools to not process certain time frames (the indicator would still load all of the time frame data though). The bools could be exposed as public settable to create the ability to select the time frames from the UI. We would not have any examples of this type of coding.

    If you wish to code a multi time frame script, please make sure you review this section of the help guide: https://ninjatrader.com/support/help...nstruments.htm

    If you would like the indicator created or modified, we can provide references to 3rd party programmers who can perform this service.

    Comment


      #17
      Hi PaulH,
      Thanks for your response. Figured the MTF issue already, thanks so very much.

      Comment


        #18
        a) Is there an indicator or way to alter the Swing indicator to see the the swing price plotted when it is actually detected/confirmed (e.g., X bars past the swing high/low)? I have used 3rd party software that copies the Swing indicator and plots the swings starting at the time they are confirmed instead of the actual swing high/low, but it seems like there ought to be something more direct.
        b) How would I set a variable based on whether the most recent swing was a high or low? My goal is to filter other setups to only longs or short based on the most recent pivot. I am a hack, but have tried setting Direction to 1 when the confirmed (by 3rd party copy of Swing indy) Swing Low is different than the prior bar, and -1 when Swing High is different than the prior bar, but in testing using background colors, it's painting the entire chart based on most recent swing rather than painting bars after a swing low different than the bars after a swing high. Help!!!???

        else if (State == State.DataLoaded)
        {
        Swing1 = Swing(Close, Convert.ToInt32(SwingStrength));
        Markers_Copy1 = Markers_Copy(Swing1.SwingLow, 0, @"swing_low", 0, false, false);
        Markers_Copy2 = Markers_Copy(Swing1.SwingHigh, 0, @"swing_high", 0, false, false);
        }
        }

        protected override void OnBarUpdate()
        {
        if (BarsInProgress != 0)
        return;

        if (CurrentBars[0] < 1)
        return;

        // Set 1
        if (Markers_Copy1[0] != Markers_Copy1[1])
        {
        Direction = 1;
        BackBrush = Brushes.PowderBlue;
        }

        // Set 2
        if (Markers_Copy2[0] != Markers_Copy2[1])
        {
        Direction = -1;
        BackBrush = Brushes.MistyRose;
        }

        Comment


          #19
          Try using this indicator.

          Comment


            #20
            Hi vickisb, thanks for posting. I made this single dot swing indicator that marks only the bar where the swing was detected:



            The swing has a SwingHighBar and SwingLowBar method. This will tell you the bar number where the last high and low occurred and it can be used to tell what came first.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            589 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            342 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            555 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            552 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X