Hello everyone,
The calculation of pivot points is very easy, since the formulas are well known.
As I try to backtest strategies using pivot points, I had the idea to create an indicator that combines both the weekly and daily pivot points.
On the chart, you see the weekly pivot point (blue line), and the daily pivot point (red).
From this, many strategies should be possible to create.
Tell me if you have an effective strategy, I can backtest it !
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
// POINT PIVOT HEBDOMADAIRE IF dayofweek < dayofweek[1] THEN weekhigh = prevweekhigh weeklow = prevweeklow weekclose = prevweekclose prevweekhigh = high prevweeklow = low ENDIF prevweekhigh = max(prevweekhigh, high) prevweeklow = min(prevweeklow, low) prevweekclose = close PPWeek = (weekhigh + weeklow + weekclose) / 3 // POINT PIVOT JOURNALIER IF dayofweek = 1 THEN dayhigh = DHigh(2) daylow = DLow(2) dayclose = DClose(2) ENDIF IF dayofweek >=2 and dayofweek < 6 THEN dayhigh = DHigh(1) daylow = DLow(1) dayclose = DClose(1) ENDIF PPDay = (dayhigh + daylow + dayclose) / 3 RETURN PPWeek COLOURED(50,50,220) AS"Pivot Week", PPDay COLOURED (220,50,50) as "Point Pivot" |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Fantastic Job!
Thanks
Thanks, man !
How is it possible to add currentWeekHigh and currentWeekLow, currentWeekOpen and currentWeekClose to calculate currentWeekPivot in this indicator.
Totally don’t match the PRT basic pivots on weekly