Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MRO on different timeframe

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

    MRO on different timeframe

    Good evening,

    Being that the MRO function does not work on multi time frames is there any work around? I am looking to find the most recent occurrence of Highs[1][0] > Highs[1][1] in the last 10 bars.

    Any help would be greatly appreciated.

    Thanks,
    Ryan

    #2
    Hello Ryan,

    Thank you for your note.

    Although you wouldn't be able to use MRO in your multi-time frame script, you could still add some logic that would find how many bars ago the condition occurred by using a loop. Here is an example of what this could look like, which is a little different from MRO because it will start from 10 bars ago and work its way forward:

    if (BarsInProgress == 1)
    {
    myMROValue = -1;

    for (int x = 10; x >= 0; x--)
    {
    if (High[x] > High[x+1])
    myMROValue = x;
    }
    Print(CurrentBars[1] + " " + myMROValue);
    }

    You may need to tweak it to get it to work exactly how you'd like it, though this is the idea to loop through and find the barsAgo index for when Highs[1][0] > Highs[1][1] was true most recently.

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

    Comment


      #3
      Emily, that is just what I needed. Thank you very much.

      Comment

      Latest Posts

      Collapse

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