Linear Regression Slope

Forums ProRealTime English forum ProOrder support Linear Regression Slope

Viewing 4 posts - 1 through 4 (of 4 total)
  • #107997

    Hello.

    I would like to investigate the behavior of the Linear Regression Slope.
    The indicator is stored in PRT as an oscillator.
    But what is the code for it?

    When I have the code,
    – can I then create a strategy, similar to a kind of Oversold/Overbold strategy, i.e. take the opposite direction at extreme values?
    – can I put a moving average in the indicator? And can I then create a strategy to open a position in Crosses over/under?
    – what about divergences? Do I get programmed to find the entry point for divergences or not open a trade if I follow the above strategies?

    I am sorry. I’m very interested in the indicator, but unfortunately I lack the art of programming here. Maybe one of you can help?

     

    #108014

    The value returned by the Linear Regression Slope can be easily used in a strategy by using LINEARREGRESSIONSLOPE as shown in the documentation:

    https://www.prorealcode.com/documentation/linearregressionslope/

    You can calculate an average of it in your code by just using AVERAGE:

    Divergences? Now with that you are entering a whole new kettle of coding fish!

     

    #108038

    can I then create a strategy, similar to a kind of Oversold/Overbold strategy, i.e. take the opposite direction at extreme values?

    Yes, but since the linear regression slope is not normalized, there are many ways to determine what are the oversold and overbought zones such as Bollinger Bands, fixed points distance, highest high / lowest low of X periods, percentile, percentage ..

    #108294

    You dear people. You are so friendly and helpful. Thank you very much. I will try that with the Average. Exactly this program line was missing for me.
    Thanks again.

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

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