Lowest from Y1 to Y2

Forums ProRealTime English forum ProBuilder support Lowest from Y1 to Y2

Viewing 15 posts - 1 through 15 (of 23 total)
  • #189750

    Hi all,

    I saw the Lowest fonction can find a lowest of a variable on the last X periodes for exemple, but how to find a lowest between 2 barindex for exemple between Y1 and Y2 ?
    for exemple on this photo how to find the lowest Low between Candle[5] and Candle[36] ( Y2=36 / Y1=5) ?

     

    entre ces 2 valeurs

    #189752

    From 5 to 36, there are 36-5+1 = 32 candles, we simply ask what was 5 candles ago the lowest among 32:

     

    1 user thanked author for this post.
    #189753

    or if you want to easily change Y1 and Y2 (with Y2>Y1 implied, haven’t added an IF statement to protect against the opposite):

     

    1 user thanked author for this post.
    #189767
    JS

    Lowest Low between candle[5] and candle[36]:

    a = Lowest[36](Low[5])

    1 user thanked author for this post.
    #189798

    tks to all for your answers,

    and how to get the barindex number of this lowest candle ?

    I saw some solution like doing a For y = 0 to 38 for exemple and compare the Lowest we get before with your solution with the Low[y] of each candle for get the barindex, but maybe they have other short soluttion ?

    #189801

    There you go:

    1 user thanked author for this post.
    #189803

    tks for your answer but I’m totaly confused, I don’t understand why it’s not working or mabt I don’t know how to use it, with my result I find the barindex 21 the blue cyrcle but with yous I find barindex = 8 the red cyrcle, where I’m wrong ? I want the fast solution for using less of computer ic

    Best Reguards

    #189805

    This is my Elder Triple screen now and headache, I’m sure your solution will be on 2 or 3 lines 🤣🤣🤣

    #189807

    Use

     

    1 user thanked author for this post.
    #189809

    I don’t know why I don’t know to use you solution, but I found this one :

    if I  the drawtext fonction with out IF condition, I get error because the LowestBars fonction can get -1 as a result

    now the good barindex is 22 instead 21 because I got one candle more in H4 TF

    #189813

    Because the 13th bar is bar 12 (0 to 12 is 13 bars), so you will have to adjust your calculations.

     

    1 user thanked author for this post.
    #189814
    JS

    From 0 to 13 is 14 bars so use:

    Roberto = 14 + x

    #189842

    It is of course possible I misunderstood the initial query, or even if I hadn’t I would easily concede perhaps I made the explanation too short alongside my proposal. But I would have to respectfully disagree with the other proposal.

    If you write:  a = Lowest[36](Low[5]) , it doesn’t give you the lowest low between candle[5] and candle[36], it would give the lowest low below candle[5] and candle[41], because at candle[36] what was lowest[5] at that time is a lowest[41] seen from now. So on one hand yes it would easily get rid of unwanted candles[0] through [4] in the search, but on the other hand it adds unwanted extra 5 candles [37] through [41] beyond [36].

    Which is why I suggested: to first assess the span of the search (Y2Y1+1 = 36-5+1 = 32 candles wide), to search that span for lowest low (that’s “a”), and from there to offset it by Y1=5 (that’s “b”), with:

    as a way of eliminating candles [0] through [4] and simultaneously avoiding addition of unwanted extra candles beyond Y2 at the other end of the spectrum in the search interval.
    1 user thanked author for this post.
    #189848
    JS

    Hi @JC_Bywan,

    You are right about adding 5 extra candles…

    The starting point is low[5] and from there your look back period is [36] = 5 + 36

    So this must also give the right answer: a = Lowest[Y2-Y1+1](Low[Y1])

     

     

     

     

    1 user thanked author for this post.
    #189887
    JS

    Perhaps a system can be made of this?

    When you know where the Lowest Low (LL) and the Highest High (HH) occur, you can say in the simplest form;

    When the HH occurs after the LL then you are in an ascending phase and vice versa when the LL occurs after the HH then you are in a downward phase.

    With the formulas:

    LLBar = LowestBars[n](Low) you determine the bar where the LL occurs

    HHBar = HighestBars[n](High) you determine the bar where the HH occurs

    When LLBar > HHBar (Bullish)

    When LLBar < HHBar (Bearish)

    Of course, this is the simplest form but maybe with MTF, SL, TP, etc. we can improve this system.

     

    1 user thanked author for this post.
Viewing 15 posts - 1 through 15 (of 23 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login