How do u calculate Pivots on a charts.

Discussion in 'Automated Trading' started by james2hunt, Aug 30, 2011.

  1. I use pivots to trail stop positions. Does anyone have a better solution than this to calculate pivots on a chart?

    See attached chart

    1/ Calculate the quadratic curve between the 5 vwap points A, E so y= a + bx + cx^2 where the Correlation Coeff is > 0.6 this gives fairly good fit. This calculation is done at the completion of each bar for the current day.
    2/ Solve y=f(x) in terms of x, where the unit of x is the number of minutes in the day. So in the example A= 9:45 = 585. This gives me points A thru E on the curve.
    3/ Now check for the five points A < B, B < C, D < C, E < D
    4/ Now find the highest Vwap in the set of 5.

    If anyone has any better solution I would be glad to here from you. This solution does miss some pivots and does give what would be considered non pivotes when the price is in a tight range.
  2. I have also added a $ pivot range by stock price to weed out the bases. So if the stocks say between 15-40 $ the pivot range from high to low across a 5 bar pivot must be at least 15c.

    I also have config parameters for the bar side i.e. you can ask for pivots where all the bars must be green on the way up and red on the way down. Also the number of bars that make up a pivot i.e 3, 5, 7, 9 e.t.c so normal setting is 5 but if you wanted mini climatic plays you could use a higher number.

    See attached example
    • vra.png
      File size:
      17.5 KB