// 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"
Hello all !
How do I make it monthly please? (on top of the current daily and weekly)
Thank you
Damien
The Line 2 might be the issue?
If so I will replace after your solution “week” by “month”.
I used your code and I can’t see any gap, as from my pics.
It may be due to some settings.
You may want to test your indicator also on another instrument.
Thank you Roberto.
But how do have the PP Monthly please?
This is the weekly one for the example.
Kind regards,
Damien
Sorry, I misunderstood your request. There you go:
// POINT PIVOT MENSUEL
IF openmonth <> openmonth[1] THEN
monthhigh = prevmonthhigh
monthlow = prevmonthlow
monthclose = prevmonthclose
prevmonthhigh = high
prevmonthlow = low
ENDIF
prevmonthhigh = max(prevmonthhigh, high)
prevmonthlow = min(prevmonthlow, low)
prevmonthclose = close
PPmonth = (monthhigh + monthlow + monthclose) / 3
Res3 = Res1 + (monthhigh - monthlow)
Res2 = PPmonth + monthhigh - monthlow
Res1 = (2 * PPmonth) - monthlow
Sup1 = (2 * PPmonth) - monthhigh
Sup2 = PPmonth - (monthhigh - monthlow)
Sup3 = Sup1 - (monthhigh - monthlow)
Return Res1 AS "Res1" coloured("green"), Res2 AS "Res2" coloured("green"), Res3 AS "Res3" coloured("green"), PPmonth AS "Pivot" coloured("black"), Sup1 AS "Sup1" coloured("red"), Sup2 AS "Sup2" coloured("red"), Sup3 AS "Sup3" coloured("red"), PPmonth COLOURED(50,50,220) AS"Pivot month"
That is just PERFECT Robeto!
Big thanks !
Damien