Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Higher High Intrabar

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

    Higher High Intrabar

    Is there a way to discover if the current high/low is a new high/low for the bar? in other words

    high[0] > high[0](same bar, 1 tick ago)

    this can obviously also be

    close[0] = high[0] && Range()[0] > Range()[0](1 tick ago).

    Anybody help?

    #2
    Originally posted by wallabee13 View Post
    Is there a way to discover if the current high/low is a new high/low for the bar? in other words

    high[0] > high[0](same bar, 1 tick ago)

    this can obviously also be

    close[0] = high[0] && Range()[0] > Range()[0](1 tick ago).

    Anybody help?
    Code:
          #region Variables
            private double CurrentHigh;
            private double CurrentLow;
          #endregion
    Code:
            protected override void OnStartUp()
            {
                CalculateOnBarClose = false;
                this.CurrentHigh = High[0];
                this.CurrentLow = Low[0];
            }
    Code:
            protected override void OnBarUpdate()
            {
                if (High[0] > CurrentHigh)
                {
                    //new high
                    // do stuff here
                    CurrentHigh = High[0]; //record new high as current
                }
                if (Low[0] < CurrentLow)
                {
                    //new low
                    // do stuff here
                    CurrentLow = Low[0]; //record new low as current
                }
          }

    Comment


      #3
      Gracias senor.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      648 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      369 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      109 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      573 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      575 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X