Plotting Trend lines & Regression channels in MT4

Hi!

I’m new to this and I have a question which may seem a bit stupid but I just can’t seem to find the answer.

I use Metatrader 4 and I want to draw a trendline, and regression channels on my eurusd chart. How do I do it?

Something like this:

Hi, kazmur

[B]To draw a trendline: [/B]

  • go to the toolbar

  • left click the fifth icon from the left (slanted line)

  • move your cursor onto your chart (your cursor will change into a tiny cross-hair, plus the slanted line icon).

  • position the cross-hair where you want to begin your trendline, and left click (and hold) your mouse.

  • holding the left mouse button down, move your mouse to wherever you want your trendline to go.

  • when the trendline is where you want it, release the left mouse button

[B]To remove the trendline:[/B]

  • position your cursor on the trendline until the pop-up label appears; note the item # of the object (trendline) you want to remove; then right click.

  • a pop-up menu will appear; select Objects List; the Objects window will appear; there may be several items listed.

  • find the item # of the trendline you want to delete, and left click on that item to highlight it.

  • select Delete; your selected trendline will be removed from your chart.

  • close the Objects window.

[B]
Next post, Linear Regression Channels.[/B]

Clint

This is off topic, but hey Clint, is that a picture of you? If so, you bear a striking resemblance to Waylon Jennings, one of the greatest country musicians of all time.

Hi, kazmur

[B]To place a Linear Regression Channel on your chart:[/B]

  • above your Toolbar, you will see File, View, Insert, … etc.

  • click on Insert, scroll down to Channels, scroll across to Linear Regression and left click.

  • the drop-down menus will disappear, and your cursor will change into a tiny cross-hair plus two small slanted lines.

  • position the cross-hair anywhere on the vertical grid-line where you want your channel to begin, and left click and hold.

  • move your mouse to where you want your channel to end, and release the left mouse button, and you’re done.

Note that you can place a series of channels end-to-end on your chart, and these channels can overlap. If your channel extends to the current candle on the far right of your chart, that channel will be live until that candle closes (the channel will not automatically extend to include the new candle).

[B]To remove a Linear Regression Channel:[/B]

  • place your cursor on the linear regression line (the center line) of the channel you want to remove; a pop-up label will appear; note the item # of the channel you want to remove, and right click.

  • a drop-down menu will appear; select Objects List.

  • the Objects window will appear; find the item # of the channel you want to remove, and left click on it to highlight it; click Delete, and your selected channel will be removed from your chart.

  • close the Objects window, and you’re done.

Clint

I get that a lot.

Thank you for your great responses! :slight_smile:

I’ve seen your excellent posts around the forum and I’d like to say that it’s great having you around here!

Thank you, sir. I appreciate your kind remarks.

I’ve been reading your Trading Log, and you have piqued my interest in the VSA methodology. I’m going to add the volume indicator to my charts, and see what I can learn.

Your Trading Log (it really is a Trading Blog) is well-written and informative. I hope you will keep writing it.

Clint

Thanks for the info on plotting regression channels Clint. I was just trying to figure that one out.

Do you trade exclusively using an MT4 platform? As a newbie so far I have found it the easier one to navigate around in. Are there others that you might recommend trying before going live?

Valkryder,

I’m considering posting a custom LRC indicator for MT4, which I have been using, and like very much. Per the rules of this Forum,
I will have to compress the .ex4 file into a .zip file, in order to attach it to a Forum post. And the instructions for getting it settled into the MT4 platform are a bit more complicated than the instructions I posted previously for launching the standard (built-in) LRC. Maybe I can get it written and posted this weekend.

As for your question about my trading, I use MT4 (actually two different MT4 platforms) for research, and for trend and momentum analysis. Then, I switch to FXCM’s MarketScope charts for S/R analysis, for trade selection and entry timing, and to actually place and manage trades (directly from the charts). I know that sounds cumbersome; but, it works for me.

MT4 is a powerful platform, especially in its ability to incorporate custom experts (which I don’t use), and custom indicators
(which I do use).

On the other hand, FXCM and I go back a ways, and their platform and charts sort of fit me, like an old pair of leather work gloves.

If you like MT4, by all means, stick with it. I would offer just one caution: the standard MT4 platform is built around market-maker trade execution. And most of the brokers who offer MT4 are market-makers (Alpari, for instance).

NDD brokers and ECN brokers who want to offer MT4 have to modify the platform to make it conform to their method of trade execution. That’s what FXCM has done, and what MB Trading is in the process of doing.

If you want to move away from the market-maker model, and do your trading through an NDD or ECN broker, then you should begin now to look for such a broker — one who offers the MT4 platform (configured for the NDD, or ECN, execution protocol).

I don’t have experience with a variety of brokers, so I can’t make recommendations (except, of course, for FXCM). If you need to go broker-shopping, you might start by consulting these lists:

ECN Forex Brokers

STP / NDD Forex Brokers

Market Maker Forex Brokers

MetaTrader Forex Brokers

Clint

Thanks for your reply Clint. I’m still trying to get famililar with the initials ECN, NDD etc…

Frankly I don’t care which platform or broker I use as long as it is fair and reliable. I just want one that does not try to cheat me or take advantage of me. If they do, I’m gone…

I probably will use the MT4 platform. May someday when I’m all grown up I’ll find something I like better.

kazmur — and others who may be interested,

If you want a dynamic LRC for your MT4 platform, I can recommend one. See the attachment at the bottom of this post.

A brief explanation: the Linear Regression Channel (LRC) built into MT4 is good, but it has one serious limitation. As I mentioned in my previous post on the LRC, when you extend it to include the current (active) candle on the far right-side of your chart, that leg of the LRC will remain active, and up-to-date, only while that particular far right-hand candle is active. As soon as the current time period ends, and a new candle begins, the LRC ceases to be active.

The zipped file attached below contains a custom LRC indicator for MT4 which overcomes this limitation. When you open the attached .zip file, you will find an .ex4 file, !LinRegrBuf.ex4, which can be copied and pasted into the MT4 “indicators” file on your computer.


Here are the specific instructions:

Click on the zipped file in the attachment, below, and open it. Check to see that the opened file is labelled !LinRegrBuf.ex4

Copy this .ex4 file (with your mouse)

Go to Start > My Computer > Local Disk © > Program Files > (your MetaTrader file, whatever it’s called) > experts > indicators

You should now be looking at a window labelled “indicators”, displaying the contents of the MT4 “indicators” file. You will see a long list of standard indicators that are built into MT4 (plus any custom indicators that may have been added).

Copy the !LinRegrBuf.ex4 file into this folder, as follows: put your cursor on a blank spot in the “indicators” window, right click, select Paste, and it’s done. Scroll to the bottom of the “indicators” list and you will find your new LRC listed there.

Close the “indicators” window.

You have now successfully added this custom LRC indicator to your MT4 files — but, it’s not yet accessible to the MT4 platform. In order to make it accessible to the platform, you have to close the platform and re-open it.

Now, if you go the Navigator window in MT4, and expand the listing of Custom Indicators (by clicking on the + sign), you will find !LinRegrBuf at the top of the list (now you know what the ! sign is for — it puts this indicator at the top of the alphabetical listing —sneaky, these MT4 code writers).

You can now add this custom LRC to any chart by dragging and dropping, as you would any other indicator. No matter where you drop it, it will open on the far right-side of your chart. And it will encompass the last x-number of candles on the chart. Initially, this number will be 50 candles, but you can change this number.

To change the number of candles encompassed by the LRC, hover your cursor over any of the three lines of the LRC, and right click.

On the pop-up menu, select !LinRegrBuf properties. A window will pop up. Click the Inputs tab. On the line labelled “Bars to Count”, double-click the number 50, backspace to erase the number, and type in the number of bars (candles) you want to encompass in your channel. Click Reset. Click OK. And you’re done.

There are other properties you can change, as well. Play with it. You won’t break it.


Unlike the standard LRC indicator built into the MT4 platform, the !LinRegrBuf indicator updates at the end of each time period, moving one candle to the right to always encompass the current candle, and always remains active.

You can leave this custom LRC indicator on your charts indefinitely. When you restart your computer and re-open your MT4 platform, your custom LRC will still be current and active.

Clint

!LinRegrBuf.zip (3.34 KB)

Thank again Clint. Works like charm!

This is a channel indicator that moves with the trend on any timeframe. If you’re an indicator trader, this may help with plotting your trend lines. Its out there, look for it.

Good luck and good trading,

Mike

Shi Channel True is a neat indicator and does a good job adjusting to market conditions in real time. The only complaint I have is its over reactions to slight market reversals. For example, if a currency pair has been trending upward in a tight channel on a 5 min chart, and then the currency tanks and a large bearish candle forms, the Shi Channel might reverse and give misleading bearish signals. It takes time to learn, you’ll see what I mean if you ever use the indicator on smaller time frames.