Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Determining if an event occured before another

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

    Determining if an event occured before another

    Hi,

    I have a simple question (not for me as I am just beginning to learn C#): Imagine you want to determine whether there was some kind of turning point on the chart (e.g. a V-formation, starting with falling prices, a low, and now rising prices). Surely one could do it much more sophisticated but let´s assume I want to check whether Close[0] is bigger than Min(Low, 20)[0] + x ticks (easy part) and that the High before this Min was x ticks higher than that Min. How could I do that? More generally, how can I determine how many bars ago this Min occured (like was at Close[1] or maybe Close[15]?) or control that some event occured before another?
    Thank you for your help.

    #2
    granite11,

    The only way to know which bar the low was on is to actually loop through the Low DataSeries and store out which bar it occurred on.
    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
    633 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    364 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    567 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    568 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X