Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Retrieving the High/Lows of a Previous Move

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

    Retrieving the High/Lows of a Previous Move

    I'm hoping that there is a simpler way of retrieving the High/Lows of a move. As an example use a simple MA CrossOver. I want to be able to retrieve the the High and Low of the last time the MA was in Up mode even though the MA's have crossed into down mode. The next time the MA's go into Up mode I can retrieve the High/Low from the previous Up mode.

    I have written this before in EsignalScript (EFS uses Java) and really don't want to have to recreate it in C#.

    So here is hoping that there is a simple combination of commands!!!!!

    HELP. PLEASE.

    TJ

    #2
    Check out the MRO function.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Mro

      OK I have been working with the MRO command but not having much luck.

      I am trying to determine the number of bars ago that the EMA10 CrossedAbove the EMA20. Am using 100 bars to look back. What is wrong with the following code?

      int barsAgo = MRO(delegate {return CrossAbove(EMA(10), EMA(20), 100);}, 100, 1);
      if (barsAgo > -1)
      Print("The last EMA CrossAbove was " + barsAgo + " Bars Ago");






      Originally posted by Josh View Post

      Comment


        #4
        Try this
        Code:
        int barsAgo = MRO(delegate {return CrossAbove(EMA(10), EMA(20), 1);}, 100, 1);
        The MRO function should do the 100 bar lookback. I don't think you need the CrossAbove to lookback 100 also.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

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