Crosses over/under a line drawn by drawline or drawray

Forums ProRealTime English forum ProOrder support Crosses over/under a line drawn by drawline or drawray

Viewing 5 posts - 1 through 5 (of 5 total)
  • #202915

    Hello all,

    • Is there a way to know if an indicator/price crosses over/under a line drawn by drawline or drawray ?
    • Is there an other instruction than crosses over/under to test if an indicator/price close “next to” or on the line drawn by drawline or drawray ?

    Thanks

    #202923

    No, there’s no instruction to detect a crossover with lines.

    You have to compute the price level on which the line is sitting candle by candle.

    Firstly, compute the price difference between the leftmost and the rightmost candle:

    then add that difference each candle to know the current price level where the line is plotted. Next candle compute the new price level where the line is supposed to sit:

    Now you can compare the current price vs the supposed price to detect any crossover:

    if the difference is negative the direction continues downwards, otherwise it will continue upwards.

    Repeat the last process each bar.

    When you need to draw a new line elsewhere, repeat the whole process from start.

     

     

     

    1 user thanked author for this post.
    #202924

    Thanks a lot for your answer Roberto.

    That’s what i though… The aim of this is to look for third of fourth contact on RSI divergences.

    To keep in an array the RSI Divergences and test other occurences, and delete divergences from the array as sson as there is a cross over…

     

    #202926

    In this case, there is 2 bearish divergences with 3 points

    #202930

    That’s fine, you can replace CLOSE with anything else, be it HIGH, LOW, RSI or MACD etc…

     

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

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