(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 100,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:

We are here to help. Just let us know what you need.

We work extremely hard to keep things positive in our community.

We do not tolerate rude behavior, trolling, or vendors advertising in posts.

We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.

We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple.

Guys, simple question: in the following code, is the independent variable some sort of sequence of integers (EG if the length is 20, that the independent variable is 1-20), or is it the lagged price?

Value1 = RSquare(BarNumber,PriceH,Length);
If LinearRegSlope(PriceH, Length)<0 Then Value1 = -Value1;

The indicator I'm looking at is called R-squared autocorrelation, but I'm not overly familiar with tradeStation.

I suppose I'm asking what both of those lines do. That is, am I doing a rolling linear regression on integer values specifying time, or am I doing the rolling linear regression on the price against a lagged version of itself?

I am not too good at math so I will stick to the first part of your question .

The first line calls a function called RSquare which takes 3 inputs, judging by the naming convention lets call them the independent input, the dependent input and length input.

The independent input, BarNumber, is a sequence of integers. For a given bar, it returns the sum of the bars in the chart before and including the given bar. If a length of 20 is specified and there are 500 bars in the chart, then the RSquare function will use the previous 20 values for this variable, i.e, 481-500.

The dependent variable seems to be an input and judging by its name, PriceH, it seems to be using the high of bars. You can verify this by the inputs to the study.

The returned value is held in a placeholder called "Value1".

The second line calculates the slope of the "PriceH" series using the same "Length" and changes the sign of the value returned in line 1 if the slope is negative.

I think.

The following user says Thank You to Hulk for this post:

Right. I'm asking about that slope that's positive or negative. Is that also using those same integers (EG 481-500) as the independent variable in that second line as well?

Would need to see the RSquare function to understand the inputs, which looks like the bar number, High dataseries and a variable Length.

Would be evaluated once per bar by default.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.

If you want to support our community, become an Elite Member.

Doesnt look like x begins at 1. x begins at BarNumber - length where BarNumber = the current number of bars in the chart so x should begin at 481 if the current bar being calculated was bar # 500 in the chart. If length was 20, x would be 481 through 500.

Alright, so Rsquare is the R-squared of the high of prices (y) with respect to bar number (x).
The slope, ALSO, is the high of prices (y) with respect to bar number(x)?