Anda di halaman 1dari 37

Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

01-18-2008, 10:48 AM #1 (permalink)

Join Date: May 2006


Location: Helliconia (Summer)
Linuxser Posts: 1,821
Moderator

Simple Linear Regression Trading system.

Hi,

First, I´m not the creator of this system I just adapted to work with MT4, made some improvements and
established clear rules to work.

You can read about this idea in Tushar Chande and Stanley Kroll book "The New Technical Trader".

I also recommend you to read that book because it will open your mind in several ways, introducing you to a new
set of indicators that work pretty well and you´ll get a simple approach to linear Regression analysis.

Book is small, near 200 pages.

We already have some threads about linear regression here in TSD.


And some links if you´re interested in learn more about linear regression:

Regression Analysis Thread with a full set of tools developed by Igorad herein the Elite Section.

Forecasting Indicators thread is another.

I do not pretend to start here another thread about linear regression analysis because this thread is only dedicated
to the system.

As I said, most of linear regression indicator we´re developed by Igorad who understand pretty well this concept.
Better than I

The chosen indicators for "the core" of this system are not the exception.

I believe this system is pretty easy to follow for everybody, its far away from that so called "amazing" systems,
and, personally, I run away from any "amazing" related to trading.

These system have some virtues:

Its very good predicting trend exhaustion


Its very good prediction turning points
It provides very good leading signals
It provides very good stop loss and exit points
It provides trend and counter trend trades.
Works in all time frames
Works with all currencies
Rules are so simple

I did find few contrary features and I really like. I have been trading with them for long time (some time if we
include test period). Some cons that this system have is.

Sometimes misses a big move and the right point to trade comes in the middle
If you're very conservative following the rules sometimes misses a big move

This system is was not thought to be a trend follower. Remember that. Trend followers system gives you the signal
when the trend is established. You could try to follow the trend by adjust the R-Squared indicator but does not
have too much sense.

1 of 2
Forex Trading - View Single Post - Simple Linear Regression Trading system.

I hope works well for you as do for me.

Ok, let see some picture to understand how it works and the rules to trade.

But first, you need to install the indicators attached and the template provided.
Attached Files
LinearRegression-REAL.mq4 (3.2 KB, 54 views)
LinearRegSlope_v1.mq4 (2.8 KB, 53 views)
R-Squared_v1.mq4 (3.3 KB, 56 views)
linear.tpl (4.5 KB, 43 views)
Linear_Regression.mq4 (6.7 KB, 53 views)

__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.

Last edited by Linuxser : 01-18-2008 at 12:21 PM.

2 of 2
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

01-18-2008, 11:38 AM #2 (permalink)

Join Date: May 2006


Location: Helliconia (Summer)
Linuxser Posts: 1,821
Moderator

Picture 1: Explanation about indicators.

LinearRegSlope indicator fluctuates a round a zero line.

It display for things:

1-When the line is below zero line and is pointing down, trend is absolutely negative. Candles are below the
center of the linear regression line.

2-When the line is below zero line and is pointing up, trend is negative. Often Candles are above the center of
the linear regression line.

3-When the line is above zero line and is pointing down, trend is absolutely positive. Candles are above the
center of the linear regression line.

1 of 2
Forex Trading - View Single Post - Simple Linear Regression Trading system.

4-When the line is above zero line and is pointing up, trend is postive. Often Candles are below the center of the
linear regression line.

PICTURE: TREND TRADES

__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.
Last edited by Linuxser : 01-18-2008 at 11:54 AM.

2 of 2
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

01-18-2008, 11:50 AM #3 (permalink)

Join Date: May 2006


Location: Helliconia (Summer)
Linuxser Posts: 1,821
Moderator

Picture 3: Buy With The Trend, Sell With The Trend

Picture 4: R-Squared levels.

The R-Squared indicator measures volatility. Below 20 level volatility is low and we have some some probabilities
that the thing is going to move.
Above 80 volatility is to high alerting about price It can´t go far.

Meanwhile 20 level its preferably to take counter trend trades, 80 level is better for counter trend trades.

I prefer to trade 20 level than 80 level and use this one a exit signal

1 of 2
Forex Trading - View Single Post - Simple Linear Regression Trading system.

__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.
Last edited by Linuxser : 01-18-2008 at 12:13 PM.

2 of 2
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

01-18-2008, 12:51 PM #4 (permalink)

Join Date: May 2006


Location: Helliconia (Summer)
Linuxser Posts: 1,821
Moderator

Picture 5: Entries and Exits. Also, counter trend trades.

Picture 6= Adding level 10

If you prefer you could a 10 level to R-Squared and minimize the risk. Taking only that trades when the R-Squared
indicator crosses this level.

If R-Squared is "flat" at zero level you would have the best trades.

1 of 2
Forex Trading - View Single Post - Simple Linear Regression Trading system.

__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.

2 of 2
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

01-18-2008, 01:36 PM #5 (permalink)

Join Date: May 2006


Location: Helliconia (Summer)
Linuxser Posts: 1,821
Moderator

Stop Loss

There is no a clear rule for stops as depends on many things. Your wallet, your risk tolerance, timeframe, and so
on.

Sometimes put your stop a few pips above/below the last swing high/low works. Sometimes using the LR line.
Sometimes the R-Squared could tell you things are going to be bad with the current trade and you should close it.
Sometimes the Channel helps.

At this point you are thinking: why so many sometimes?


Because stop loss I believe it's impossible to have only one rule to set you stop loss. The only way to keep you
alive and trading is money management.

One top currency trader always says: stops loses are the way you choose to save yourself when you´re deep inside
a bad decision.

Once you trade becomes positive always move your stop to break even.

1 of 3
Forex Trading - View Single Post - Simple Linear Regression Trading system.

2 of 3
Forex Trading - View Single Post - Simple Linear Regression Trading system.

__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.

3 of 3
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

01-18-2008, 02:03 PM #6 (permalink)

Join Date: May 2006


Location: Helliconia (Summer)
Linuxser Posts: 1,821
Moderator

Loser Trades

As any other system, this one have loser trades. No mater of what you do losers are part of trader´s life.

You could think it could be avoided maybe trading in the direction of the big time frame, maybe avoiding the news.
Well, perhaps, perhaps, perhaps...

1 of 2
Forex Trading - View Single Post - Simple Linear Regression Trading system.

__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.
Last edited by Linuxser : 01-18-2008 at 02:09 PM.

2 of 2
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

01-20-2008, 08:08 PM #7 (permalink)

Join Date: May 2006


Location: Helliconia (Summer)
Linuxser Posts: 1,821
Moderator

First Trade

By look the last picture on the previous post we could see all elements aligned and giving us a short trade.

Our Channel is pointing down, LinRegSLope is below zero and pointing down and R-Squared is sleeping near zero.

By entering short at some point between 1.4600/20 and set our Stop at we could exit right at this moment when
R-Squared is reaching the top level and cash 50/70 pips or wait some hours targeting 1.4500.

About GBP, our SL was moved to breakeven point, Our target is 1.9480.

1 of 2
Forex Trading - View Single Post - Simple Linear Regression Trading system.

__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.
Last edited by Linuxser : 01-20-2008 at 09:46 PM.

2 of 2
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

01-21-2008, 08:08 AM #8 (permalink)

Join Date: May 2006


Location: Helliconia (Summer)
Linuxser Posts: 1,821
Moderator

First Trade Almost done.

A couple of minutes ago we moved our SL to 1.9530 to keep a small profit and set a new target to 1.9460 near the
low of the day. If you had set our previous 1.9480 target your trade is happy in profits for today.

If you didn't. You could close the trade now without see the R-Squared because we do not to have American
session and London is almost done.

Our Euro trade is having profits too. Our 1.4500 target was hit.

1 of 2
Forex Trading - View Single Post - Simple Linear Regression Trading system.

__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.
Last edited by Linuxser : 01-21-2008 at 08:12 AM.

2 of 2
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

01-23-2008, 04:20 AM #9 (permalink)

Join Date: May 2006


Location: Helliconia (S
Linuxser Posts: 1,821
Moderator

We have a short signal today. See picture for details. This trade is a little out of time but it have potential.
If prices keep going down we could move our SL to 1.4650 first and then to brakeven. If R-squaed touch extreme 80
we are going to exit.
Attached Images

__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.

1 of 1
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

01-23-2008, 12:24 PM #10 (permalink)

Join Date: May 2006


Location: Helliconia (Summer)
Linuxser Posts: 1,821

Moderator

Quote:

Originally Posted by Linuxser


We have a short signal today. See picture for details. This trade is a little out of time but it have potential.
If prices keep going down we could move our SL to 1.4650 first and then to brakeven. If R-squaed touch
extreme 80 level we are going to exit.

Well, a nice day a little profit and low risk trades. The best is our SL is safe even after having moved to a new level.

However our target was not hit and for Finonacci traders price just bounced back on 50% retracement.

Day is almost over and the idea to pay rollovers for a couple of hours dislikes me. Se, we can close our trade here
with 30 pips profits for safe.

We had lot of possible trades in several currencies today but I decided for this classic.

Remember, in this thread you should not see how well works this system in past time, writing the trades after they
happened.

The idea is to learn and develop together and the only way is by posting the trades before they happen. Also you
have a free signal commentary

See you tomorrow.

1 of 2
Forex Trading - View Single Post - Simple Linear Regression Trading system.

Attached Images

__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.

2 of 2
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

01-29-2008, 09:11 PM #11 (permalink)

Join Date: May 2006


Location: Helliconia (Summer)
Linuxser Posts: 1,821

Moderator

Euro is Flat

The euro is flat during Asian Session. All Indicators are flat.

We will have a interesting move in a couple of hours.

We could set a couple of orders.


Attached Images

__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.

1 of 1
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

01-30-2008, 02:31 PM #12 (permalink)

Join Date: May 2006


Location: Helliconia (Summer)
Linuxser Posts: 1,821

Moderator

Ok, one of the buy order was activated at the open of the EU session followed with choppy hours because the
market was waiting for the FED announcement.

Talking about probabilities our long trade had 70% off been successful agaisnt the 30% for our short trade.
Fundamental analysis should not be discarded for TA trading.

Market was expecting a rate cut and we know rate cuts plays against the dollar when all people are talking about a
recession in the US.

However the nature of the previous flat day give us chance to set short orders with low risk because we also know
the market could go against what we thought. Never say no.

We could exit right now for a 70/80 pips trade or move our SL to 1.4830 because with the news released the Euro
have plenty to run to 1.4500.
Attached Images

__________________

1 of 2
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

01-30-2008, 03:43 PM #13 (permalink)

Join Date: May 2006


Location: Helliconia (Summer)
Linuxser Posts: 1,821

Moderator

Daily Trend

Let´s take a look at the daily Euro.

LinRegSlope is about to close above zero line and R-Squared is touching zero line, our channel is pointing UP.

Cross is ready to retest 1.50 level and seems it would have enough strength to pass it.
Attached Images

__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.

1 of 1
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

01-31-2008, 09:08 AM #14 (permalink)

Join Date: May 2006


Location: Helliconia (Summer)
Linuxser Posts: 1,821
Moderator

New Template

A new template will be ready soon.

As is showed in the picture we´re looking for a early detection of extreme zones.

Compare this template and the previous with the same euro chart and same trade.

1 of 2
Forex Trading - View Single Post - Simple Linear Regression Trading system.

__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.
Last edited by Linuxser : 01-31-2008 at 09:11 AM.

2 of 2
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

02-12-2008, 08:16 AM #16 (permalink)

Join Date: May 2006


Location: Helliconia (Summer)
Linuxser Posts: 1,821

Moderator

Updated template.

You need PolyFitBands_v1


Attached Images

Attached Files
linear_v1.tpl (3.7 KB, 19 views)

__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.

1 of 1
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

02-15-2008, 02:29 AM #17 (permalink)

Join Date: May 2006


Location: Helliconia (S
Linuxser Posts: 1,821
Moderator

I believe our best chance to today is usdchf. I did not trade this one but looks nice.

Sell stop below 1.0955. SL 1.0990


Attached Images

__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.

1 of 1
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

02-15-2008, 09:50 AM #18 (permalink)

Join Date: May 2006


Location: Helliconia (Summer)
Linuxser Posts: 1,821

Moderator

Trade closed

Trade closed, 40 pips profited.

Why 40 and not 60/70 because the low was... Well, is easy to say now with tomorrow´s newspaper.

Meanwhile the trade was open we had to move the SL to the entry point at 1.0955.

We had signals with almost all pairs today, but this one was the pristine. Choose the trades, don´t let you the
trades choose you.
Attached Images

__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.

1 of 2
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

02-18-2008, 10:40 AM #19 (permalink)

Join Date: Oct 2005


Location: Ukraine
igorad Posts: 754
Senior Member

Just FYI:

I found good info about R2 for nonlinear regression


How good is the fit: http://www.curvefit.com/goodness_of_fit.htm

PolyFit R2 you can find here Regression Analysis


__________________
Let's improve trade skills together
http://finance.groups.yahoo.com/group/TrendLaboratory

1 of 1
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

02-20-2008, 02:11 AM #21 (permalink)

Join Date: May 2006


Location: Helliconia (Summer)
Linuxser Posts: 1,821

Moderator

Jpy

Possible JPY Trade.

This is a Risky one but we could profit 50 pips.

Sell now. Stop 107.90. Target 1 107.00 Target 2 106.50


Attached Images

__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.

1 of 1
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

02-20-2008, 02:23 AM #22 (permalink)

Join Date: May 2006


Location: Helliconia (S
Linuxser Posts: 1,821
Moderator

Gbp

This looks better than JPY.

Sell stop 1.9450 (on bar close of course). SL 1.9510. Target 1.9384.
Attached Images

__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.

1 of 2
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

02-20-2008, 04:27 AM #23 (permalink)

Join Date: May 2006


Location: Helliconia (Summer)
Linuxser Posts: 1,821

Moderator

Quote:

Originally Posted by Linuxser


Possible JPY Trade.

This is a Risky one but we could profit 50 pips.

Sell now. Stop 107.90. Target 1 107.00 Target 2 106.50

Well it's the JPY and our stop was hit.


I did not expect other than loses when trade with this pair.
__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.

1 of 1
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

02-20-2008, 07:11 AM #24 (permalink)

Join Date: May 2006


Location: Helliconia (Summer)
Linuxser Posts: 1,821

Moderator

Well, not a good day, -40 with JPY and +40 with GBP because I decided to close the GBP trade to match the loses.

If you have the trade open I believe the day start to smell risky because we have lot of news coming in 20 minutes
and most pairs had move their daily ADR.
__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.

1 of 1
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

03-06-2008, 05:58 AM #29 (permalink)

Join Date: May 2006


Location: Helliconia (Summer
Linuxser Posts: 1,821
Moderator

I like Cad for Today.

Sell at current level (0.9846), Stop 25 pips (almost none), 0.9870 and Target 0.9700, 150 pips. trailing every 25
pips.
Attached Images

__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.

1 of 1
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

03-06-2008, 07:44 AM #30 (permalink)

Join Date: May 2006


Location: Helliconia (Summer)
Linuxser Posts: 1,821
Moderator

Quote:

Originally Posted by Linuxser


I like Cad for Today.

Sell at current level (0.9846), Stop 25 pips (almost none), 0.9870 and Target 0.9700, 150 pips. trailing
every 25 pips.

Ooops. Spike hits our SL. Fortunately only 20 pips loses.

Building permits negative against little positive expectations. Seems recession is expanding outside US.
__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.
Last edited by Linuxser : 03-06-2008 at 07:47 AM.

1 of 1
Forex Trading - View Single Post - Simple Linear Regression Trading system.

View Single Post Thread: Simple Linear Regression Trading system.

04-08-2008, 09:06 PM #31 (permalink)

Join Date: May 2006


Location: Helliconia (Summer)
Linuxser Posts: 1,821
Moderator

Hello.

Some quotes from an article about Linear Regression Slope and r-squared:

Quote:

IMPORTANCE OF SLOPE
The linear regression method provides several useful outputs for technical analysis, one of which is slope.
The slope shows how much prices are expected to change per unit of time that is, how quickly prices may
change. A steep slope indicates a fast rate of change. A shallow slope indicates a slow rate of change.
When the slope of the trend first becomes
significantly positive, you could open a long position with some assurance that the trend will continue.
When the slope first becomes significantly negative, you could close your long position, or open a short
position, for similar reasons.
However, while slope gives you the direction of the trend (whether
positive or negative), like many other indicators it gives no measure of
how strong the trend is. It is helpful, therefore, to consider slope in relation
to r-squared†, which indicates the strength of the trend. A high rsquared
value, combined with a high positive or negative slope, gives you some confidence that a strong trend

Quote:

R-SQUARED
Although it is useful to know the rsquared value, ideally, you should use r-squared in tandem with slope.
High r-squared values accompanied by a small slope may not interest
short-term traders. However, high r-squared values accompanied by a large slope value may be of great
interest. The r-squared indicator can be used successfully as a confirming indicator. Momentum-based
indicators such as stochastics, relative strength index (RSI), commodity channel index (CCI), and so forth
and moving average systems require trend confirmation in order to be considered reliable. R-squared
provides a means of quantifying the strength of price trends. If r-squared is above its critical value and
heading up, you can be 95% confident that a strong trend is present.
When using momentum-based indicators, you should only trade overbought/oversold levels if you have
determined that prices are trendless or weakening (that is, prices have a low or lowering r-squared value).
Be aware that in a strongly trending market, prices can remain overbought or oversold for extended
periods. Therefore, you may want to review any
trading systems that depend strictly on overbought/oversold levels, and consider adding the LRS/r-squared
indicators.

Quote:

You may consider opening a shortterm position opposite the prevailing trend when you observe the slope
rounding off at extreme levels. For example, if the slope is at a relatively high level and begins to turn
down, you may consider closing your long position or opening a
short position. You may consider opening a short-term position opposite the
prevailing trend when you observe rsquared rounding off at extreme levels.
For example, if the slope is positive and r-squared is above 0.80 but begins to turn down, you may
consider selling or opening a short position.

Quote:

Note that an unusually high r-squared reading (for example,

1 of 2
Forex Trading - View Single Post - Simple Linear Regression Trading system.

0.8) might indicate an overbought situation and a possible downturn. If additional oscillators are indicating
a downturn, this would not be a good entry signal. Conversely, if r-squared is just crossing above the
threshold and other confirming indicators are displaying similar characteristics,
it might be a very good buy signal. This technique is discussed in few technical analysis books. Try it on
your watchlist and paper trade it until you decide if it’s for you.

__________________
Do you have some idea or suggestion to improve the forum? post it here

If you like manual trading you don´t need the best indicator, the best system or the best computer. Just the best chair.

2 of 2

Anda mungkin juga menyukai