Linear Regression Slope

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #107997 quote
    f1_maikf1_maik
    Participant
    Junior

    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 quote
    VonasiVonasi
    Moderator
    Master

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

    LinearRegressionSlope

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

     a = average[200](LinearRegressionSlope[10](close))

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

    #108038 quote
    NicolasNicolas
    Keymaster
    Legend

    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 quote
    f1_maikf1_maik
    Participant
    Junior

    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)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Linear Regression Slope


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
f1_maik @f1_maik Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by f1_maikf1_maik
7 years ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 09/19/2019
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...