automatic trendlines and trend channels

Discussion in 'Technical Analysis' started by ag123, Feb 21, 2020.

  1. ag123

    ag123

    are there any 'common' means to draw an automatic trendline and trend channels?

    trendlines and trend channels such as these
    https://school.stockcharts.com/doku.php?id=chart_analysis:trend_lines

    i found an old thread from a web search, but i refrain from posting in that thread as that is some 9 years old
    https://www.elitetrader.com/et/threads/mathematically-computing-a-trendline.224044/

    it is easy to visualize on charts the highs and lows and draw trendlines/trend channels on them connecting the edges of the local highs and lows. but the reality is that the trendlines do not necessarily touch the edges even if they seem so. statistically they are likely off by some points. sometimes we subjectively ignore an edge or draw it without touching the edge but close. but on a chart it still looks like a trendline intuitively.

    i've thought about linear regression (that's probably a start), but that linear regression mostly draws an average slope that cuts right in the middle through the series of points rather than the edges. and that the slope of the linear regression does not necessarily coincide with its edges
     
    murray t turtle likes this.
  2. I would suggest to use William`s fractals to determine pivot highs and lows.
    Then draw a trendline between the low fractals. Ready.
     
  3. ag123

    ag123

    thanks for the hint, i did a web search with that as a keyword and interestingly found
    an issue thread logged for techan.js a javascript based TA app which seem to discuss this
    https://github.com/andredumas/techan.js/issues/3

    the home web site is here
    http://techanjs.org/

    another item found in web search is to use a hough transform.
    http://www.meacse.org/ijcar/archives/128.pdf
    this is probably outside the realm of simply TA and more in apps and algorithmic trades

    i think what it means by a hough transform is to randomly draw lines between points on a chart and to see how many points it cuts through. this seem to be a nice idea. it is not feasible to do this manually, but computers has no problem with this. then i'd think I can use linear regression as a 'guide' to hopefully select the more appropriate lines

    this seemed quite interesting and is worth exploring in addition to the fractals.

    but it seemed this won't be easy/simple as trendlines is really partly subjective.
    we intuitively draw lines on charts that seems to make sense as 'major' trends.
    the reality is that if we consider any 2 points on a chart then there are n x (n-1) possible lines to draw. out of which there are probably a small sub set which we consider intuitively as trends. and that it isn't one but possibly many possible trend lines
     
    Last edited: Feb 21, 2020
  4. Subscribed.

    I've been looking for such a tool myself, but have not yet found one out-of-the box that is worthwhile.
     
  5. ag123

    ag123

  6. ZBZB

    ZBZB

  7. %%
    Sure is;
    most charts services auto draw a 200 day moving average.I pay some , but not much attention to straight tendlines .WHY??? Because the market seldom moves in a straight line. Market Maker's Edge/Joshua Lukeman notes, avoid your handrawn trend lines/ avoids trader bias........................................................................................................Good question.
     
  8. ag123

    ag123

    nice summary, i do agree trendlines can lead to trader bias. However, it is still a rather useful tool.
    thinking in this way, if market in a long term swings around an expected rate of inflation and the short term driven by events and short term expectation of forward earnings and prospects if it is expected to be bad you can draw a downtrend trend channel that envelops the bounces (lower high, lower low), if it is expected to be good you can draw a uptrend trend channel that envelops the corrections (higher high, higher low).

    And that for the long term if you do linear regression, you could probably draw a line with that average slope the represent the inflation. As for the short term the front facing inflation or deflation expectation would also form trends and you could draw a short term linear regression line passing through it.

    of course this is overly simplistic, trends are casually observed on charts and we develop a bias simply observing it being up or down. more often than not prices forms congestions and spirals (expanding triangle, contracting triangles) still one could nevertheless draw trendlines at the touch points at the triangles.

    the trendlines and trend channels, biased or otherwise are sometimes used as guides for support and resistance levels, still it is biased as i'd guess if one use an app to draw a multitude of trend lines they would still look like trend lines and as traders ourselves, we draw one that looks most intuitive to ourselves being the major trend, when literally, if a computer do it, it may pick lots of them which is mostly not intuitive to us. i.e. we do develop a bias based on a trend we think it is
     
  9. Baron

    Baron ET Founder

    One of our sponsors here at ET called TrendSpider specializes in software that does just that.

    https://www.trendspider.com/