Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

max and minimum of a bar

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

    max and minimum of a bar

    Simple question.
    How can I tell the strategy builder that I'm only wanting big bars?
    Like Max - Min = 100 points big? Thanks

    #2
    Hello ezrollin,

    Thanks for your post.

    There are two ways you can do this.

    1) Use the indicators MAX and MIN and set them to be 1 period and set the MAX to the High data series and set the MIN to the low data series and use "Offset" to subtract the MIN from the MAX and that will provide the number of points in the bar.

    2) Use the Range indicator, which will provide the number of points in the bar.

    For ease of use, I would suggest just using the Range indicator and then you can set a condition that the Range must be greater than Misc>Numeric Value (and provide a number of points of interest).



    Comment


      #3
      In builder would it just be Range()[0] > 100?
      Seems like it should be working on 2 variables like Range(high - low)[0] > 100 to be correct?

      Comment


        #4
        Click image for larger version

Name:	Untitled.png
Views:	325
Size:	4.0 KB
ID:	1184143
        think I figured it out on that last one thanks

        Comment


          #5
          Hello ezrollin,

          Thanks for your replies.

          No, all you need is Range() as that is what Range means/does (High- low).

          Here is the code of the Range indicator:
          protected override void OnBarUpdate()
          {
          Value[0] = High[0] - Low[0];
          }

          Try printing out the range value of each bar and you will see.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          45 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          21 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          31 views
          1 like
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          50 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          42 views
          0 likes
          Last Post CarlTrading  
          Working...
          X