Hello Prorealtimers!
What is the best way to capture the pivot points? I’ve written an indicator to show the pivot points by comparing the lows and highs. It is rather complex. I wonder if there is an easier way.
Have you tried searching? There are I believe many pivot line indicators already coded. for example:
Pivot Points (Daily)
They are daily pivots. I’m trying to code an indicator to find pivots in 1 min timeframe.
Well then you can only really use any of the fairly standard pivot line code and set the high in the calculation as the highest high in your look back period and the low as the lowest low in that period. The close will have to be the close of the last candle or whatever you set as the end of your look back period.
In my indicators that I just put in the library I use pivot levels as a gauge of market sentiment rather than targets and stops. Daily pivots are something that all traders are aware of and so may be levels that effect market movements. If you have your own minute pivot levels on minute candles then they may just end up being lines in the sand but then I don’t know what your intention is for them.
AVTParticipant
Senior
Here’s all kind of info about the level calculation: http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:pivot_points
Instead of high,low,close you could use use high[1], low[1], close[1] and not to color your whole chart you could use DrawText to put little dots above/below the candles instead of lines – so you would have the pivot point for the current 1 min. derived from the last min. If that’s what you in mind.