Trend Line Indicator

Posted by admin8277 on October - 5 - 2014
Spread the love
Up Trend

click to enlarge image

 

 

 

 

 

 

 

Indicator

Purpose:

Displays a Trend line to graphically show the price trend over the specified number of bars (TrendBars) and excluding the most recent specified number of bars (NonTrendBars).

Generates an alert when the recent “nontrended” bars break the trend line. Generates another alert when the price retraces to the trend line.  Will also email you and/or text you assuming you have this setup.

Inputs:

  • TrendBars – Number of bars being trended
  • NonTrendBars – Most recent bars that are excluded from trend line calculation
  • BarsPreceding – Number of consecutive bars preceding a potential swing point
  • ResistColor – Resistance (downtrend) line  color
  • SupportColor – Support (uptrend) line color
  • AlertOnBreakout – if true indicator will alert on a close above resistance line or below support line
  • AlertOnRetrace – if true indicator will alert on a retracement back to the resistance or support line

 

User Notes:

The trend line is based on swing points identified in the TrendBars bars.  The number and significance of the swing points are controlled through the BarsPreceding input.  In general this is the number of consecutive bars immediately preceding a swing high or low point that must have a lower high or higher low respectively.

Instead of just connecting the highest/lowest swing points, the trend line chosen will be one that connects the “best” swing points and mostly closely matches the overall price change.

It is useful to see the action of recent bars relative to the trend bars.  This is used in the alerting logic.  This version of the indicator should occasionally be refreshed (reloaded) on the chart.

Down trend

click to enlarge image

 

 

 

 

 

 

System Requirements
To run Metatrader 4 you should be using Windows 2000 or later, with a 2.0 GHz or faster CPU, and at least 512 MB RAM (although 1 GB is recommended). You should have a screen resolution of 1024 x 768 or higher, and an internet connection speed of 56 kbps or faster.