Linear Regression Slope
Forums › ProRealTime English forum › ProOrder support › Linear Regression Slope
- This topic has 3 replies, 3 voices, and was last updated 6 years ago by
f1_maik.
-
-
09/19/2019 at 7:40 PM #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?
09/19/2019 at 10:24 PM #108014The 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:
1a = average[200](LinearRegressionSlope[10](close))Divergences? Now with that you are entering a whole new kettle of coding fish!
09/20/2019 at 8:02 AM #108038can 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 ..
09/23/2019 at 9:58 PM #108294 -
AuthorPosts
