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 cmoran13, Yesterday, 01:02 PM
    0 responses
    30 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    22 views
    0 likes
    Last Post PaulMohn  
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    160 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    95 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    148 views
    2 likes
    Last Post CaptainJack  
    Working...
    X