Trendlines and Support/Resistance

Discussion in 'Automated Trading' started by Clovist, Jan 24, 2009.

  1. Clovist


    Im just wondering are there any systems based quite largely around trendlines and support/resistance. It seems that when i am thinking about how to automate this system and turn it into code i always stop when something that is subjective or i usually draw from points located with my eye.

    Trendlines i draw quite mechanically but i draw them from swinglow/high to swinglow/high and i dont know how to mechanicly determin them because trading itself is very fractal and sometimes i notice smaller swing cycles within larger swings or the market ranges sideways for a while during a swing or whatever.

    Are most automated systems based on indicators relative to price like moving averages rather than indicators drawn from abstract subjective points or from points that rely on abstract subjective concepts to be defined. How do you get a computer to calculate accurately trendlines, support, resistance, fibbonacci retracements or do you simply rely on only things that can be mechanicly calculated
  2. c4ytan


    I'd like to know the answer to this myself.
  3. Tums


    <img src=>
  4. Bear with me as I am a statistician, but here's a lazy-man's approach I have used in the past:

    Take the actual, untransformed ticks and use a kernel-density estimator to get you an approximation of a probability density function. You'll notice that support and resistance ranges correspond to local minima and maxima on the PDF (as they should, given that the transactions are more "dense" at those levels.)

    You can then isolate the actual levels *numerically* (i.e., you're going to have to come up with an algorithm) by taking the first derivative of the PDF and setting it to 0 and solving for regions on the PDF where the tangent line is horizontal -- this is to isolate and generate the list of minima and maxima.

    Nice thing about this approach is that you can make mathematical adjustments to your criteria for how dense a region has to be to qualify as resistance, etc.