Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DataSeries vs Close of Bar

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

    DataSeries vs Close of Bar

    Hi,

    In the below example, which one is the data series versus the close of bar? Is the [0] close of bar and [3] data series?

    minlow = MIN(Lows[0],2)[3];


    Thanks

    #2
    Hello AgriTrdr,

    Thank you for your post.

    I'm not sure what you are referring to as the data series versus the close of bar. The syntax available for the MIN indicator is as follows:
    MIN(int period)
    MIN(ISeries<double> input, int period)

    Returns default value
    MIN(int period)[int barsAgo]
    MIN(ISeries<double> input, int period)[int barsAgo]

    In the case of MIN(Lows[0],2)[3] this would be getting the MIN value from 3 bars ago based on the Lows[0] as the ISeries<double> input series with a period of 2.

    Please let us know if we may be of further assistance.

    Comment


      #3
      Hi Emily,

      What i'm trying to find out is the low of the last 2 bars on the 3rd data series. Would that be the correct way to do it?

      Thanks

      Comment


        #4
        Hello AgriTrdr,

        Thank you for your reply.

        When working with Lows as the ISeries<double> input series, the number inside of the brackets determines the barSeriesIndex that you are referring to. If you want the 3rd data series, as in there is a primary series and two added data series, that would be Lows[3]. The primary series would be index 0, the first added series is index 1, and the second added series (or the 3rd series altogether) is index 2.

        What this would look like to find the lowest low of the last 2 bars on the 3rd data series is:
        Code:
        MIN(Lows[2], 2)[0];
        Another option would be to add a condition that checks if the BarsInProgress is 2, meaning that OnBarUpdate() is being called for an update on that 3rd data series, and then you could use the following syntax instead:
        Code:
        if (BarsInProgress == 2)
        {
        Min(Low, 2)[0];
        }
        I suggest reviewing the Multi-Time Frame & Instruments page in the help guide for a more detailed explanation of working with multiple data series. The section for accessing the price data in a multi-bars script may be especially helpful for this example:


        Here are the help guide pages for MIN and Lows as well:



        Please let us know if we may be of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        63 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        139 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        75 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        45 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        50 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X