Slope issues with divergence indicator

Forums ProRealTime English forum ProBuilder support Slope issues with divergence indicator

Viewing 1 post (of 1 total)
  • #201969

    Hello,

    I am having a few issues trying to code an indicator. It will be a divergence indicator when its done but at the moment I am just trying to have the indicator plot a slope so I can find the value of this slope at any given point in time. All I am focusing on in the code below at the moment is when prices have made a lower high and RSI has made a higher high.

    As youll see in the screenshots Im not having an issue drawing a segment when these conditions are true but I am having trouble plotting my slope line, I can only get it to plot this line AFTER the event has occurred as you can see in the red lines which have been shaded grey. The blue lines are my drawsegment lines which are working well.

    The reason I want my slope lines is so I can make sure no other RSI has crossed over these line during the time they are active….

    Im sure my coding clunky and inefficient to look at for anyone to look at but with my very limited experience its the best I’ve managed to do.

    Any advice would be greatly appreciated so I can learn how to do this better.

    Thanks in advance!

     

Viewing 1 post (of 1 total)

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