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 Hwop38, 05-04-2026, 07:02 PM
        0 responses
        160 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        307 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        244 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        348 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        178 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X