First candle with a lower low

Forums ProRealTime English forum ProOrder support First candle with a lower low

Viewing 9 posts - 1 through 9 (of 9 total)
  • #16957

    I need to get the recent lower candle. How is this made? Have tried summation but in that case, say if i put in [5], i can get an even lower candle and also, a candle thats not lower then the closing one. I need the first candle that has a lower low then the closing candle.

    Any suggestions?

    #16959

    To get the lower low, you only need to use the Lowest instruction : get the recent lowest low

    #17055

    Thanks Nicolas! I’ve tried that. But if, lets say that there are five lower candles after each other, “lowest” is going to pick the last candle since that’s the absolut lowest one. I want the get the low of the first. But if the first and the second have a higher low and then the third have a lower, then i want to pick the third. I did a strict “if” solution:

    …but rather have a function that can stretch back in time until it finds the lower low and then stop.

    #17070

    I’m not sure to understand well, but you can refer to the last lower low previous of the current candle like this:

    You’ll get the lowest low of the 5 previous candlesticks before the current one.

     

    #17080

    Yes. But i need the the first low. Not the last. The first candle who has a lower low. Should be simple but i cant get my head around it 🙂

    #17091

    Hi Johan

    First low, Last Low?? Out of 5 bars / candles there is only one bar that will be the lowest low (out of 5) and Nicolas code above will give you that.

    Or do you want the low (in price?) of the first of 5 previous candles?

    I am intrigued so get back to us please?

    Regards

    GraHal

    #17112

    I must admit I didn’t understand your question the first time around, now I think I do but to be honest, I’m still not sure… Let’s assume I have understood the question correctly, then I’ve come up with this to solve it. However, we need to be aware a “while” loop could end up in some cases being considered as an infinite loop without solution returning an error message, that’s why I’ve included a maximum number of candles to look back, you can change this number in case the chosen 100 value is not enough for your needs.

    The main return is “barnumber”, it gives you the barindex value of the candle in the past with the most recent lower low than your current candle’s low. For easier visual localisation of such bar number found, I’ve added “barindex” in the return line too.

    And I’ve added another line parallel to barindex which shows the oldest candle search limit in the past (the safeguard against infinite loop). When “barnumber” touches it, it means there was no success finding a lower low within the maximum chosen number of candles to look back.

    That would be a probuilder piece of code of course. How you include this and make use of it within a larger piece of pro-order code and without the return line is up to you. Just remember to separate cases when a lower low is found before the limit, from cases it isn’t.

     

     

    2 users thanked author for this post.
    #17429

    Right on the money. This was exactly what i was looking for. Thanks a lot Noobywan!

    #17433

    Another thing… Might even be suited for a new topic, but when i “graph” values like barindex they always start from 1000 for some reason. How can i get the barindex to graph from 0? Have anybody stumble upon this?

Viewing 9 posts - 1 through 9 (of 9 total)

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