Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple Time Frame. Reference correspondent Close value through the loop

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

    Multiple Time Frame. Reference correspondent Close value through the loop

    Hi,
    Is it possible to access correspondent Close value of another time frame, going through the loop on the master time frame. Example:

    double closeArray0 = 0;
    double closeArray1 = 0;
    for (int i = 0; i < 100; i++)
    {
    if (Closes[0][i] < Closes[0][i + 1])
    {
    closeArray0 = Closes[0][i];
    closeArray1 = Closes[1][?];
    break;
    }
    }

    Thank you

    #2
    Hello Tatiana,

    Thank you for your post.

    Can you clarify what you mean by the corresponding close for the secondary series?
    Would this be the close at the same time or the same price?

    Comment


      #3
      Yes, I mean correspondent by the same time

      Comment


        #4
        Hello Tatiana,

        Thank you for your response.

        What are the two series in this case? Are they time based like Minute or Day? Or tick based like Tick, Range or Renko?

        The tick based bars have no set time to close so this calculation would be a bit more complicated. If it was a time based bar the calculation would be the following:
        Code:
        			if(CurrentBars[0] <= 100 || CurrentBars[1] <= 100)
        				return;
        			
        			double closeArray0 = 0;
        			double closeArray1 = 0;
        			for (int i = 0; i < 100; i++)
        			{
        				if (Closes[0][i] < Closes[0][i + 1])
        				{
        					closeArray0 = Closes[0][i];
        					for (int j = 0; j < CurrentBars[1]; j++)
        					{
        						if(Times[0][i] == Times[1][j])
        						{
        							closeArray1 = Closes[1][j];
        							break;
        						}
        					}
        					break;
        				}

        Comment

        Latest Posts

        Collapse

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