Thank you very much.
If I apply it as is on the NQXXXX 1min with 40 kUnits, MonthPivot is equal at 17240,62 whereas the PRT native Piv M is at 17123,33.
I am trying to understand why
…during February I mean.
and it looks like the vertical line is drawn from the 2nd of Feb instead of the 1st.
I have not tried with 1 minutes (only 30 minutes and bigger, 1h 4h etc…), let me check
Here US Tech 100 (IG Markets) 1 min time frame, working fine on any time frame.
What is NQXXXX ?
Monthly Pivots on the Price (5 min time frame). As you can see, it is exactly the same as PRT embeded Pivots…
ONCE DayH = high
ONCE DayL = low
ONCE DayC = close
ONCE FullDay = 0
ONCE FullWeek = 0
ONCE FullMonth = 0
IF (OpenTime=010000 and dayofweek<>1) or (dayofweek<DAYOFWEEK[1]) THEN
if dayofweek <> 1 or (dayofweek<DAYOFWEEK[1]) THEN
PivotDuJour = (DHigh(1) + DLow(1) + DClose(1)) / 3
elsif dayofweek = 1 then
PivotDuJour = (DHigh(2) + DLow(2) + DClose(2)) / 3
endif
MonthH = max(MonthH,DayH)
MonthL = min(MonthL,DayL)
MonthC = DayC
WeekH = max(WeekH,DayH)
WeekL = min(WeekL,DayL)
WeekC = DayC
pDayofWeekI = DayofWeekI
pDayI = DayI
pDayH = DayH
pDayL = DayL
pDayC = DayC
DayofWeekI = DayofWeek
DayI = Day
DayH = High
DayL = Low
DayC = Close
If FullDay then
DayPivot = (pDayH + pDayL + pDayC)/3
Else
DayPivot = undefined
FullDay = 1
Endif
If DayofWeekI < pDayofWeekI then
pWeekH = WeekH
pWeekL = WeekL
pWeekC = WeekC
WeekH = High
WeekL = Low
WeekC = Close
If FullWeek then
WeekPivot = (pWeekH + pWeekL + pWeekC)/3
Else
WeekPivot = undefined
FullWeek = 1
Endif
//drawvline(barindex)
Endif
If DayI < pDayI then
pMonthH = MonthH
pMonthL = MonthL
pMonthC = MonthC
MonthH = High
MonthL = Low
MonthC = Close
If FullMonth then
MonthPivot = (pMonthH + pMonthL + pMonthC)/3
Else
MonthPivot = undefined
FullMonth = 1
Endif
//drawvline(barindex)
Endif
ENDIF
DayH = max(DayH,high)
DayL = min(DayL,low)
DayC = close
Return WeekPivot style(line,4) coloured("orange",160)
I added also weekly Pivots (On the picture, weekly Pivots on price 5 min time frame)
If i search for anything else than US Tech 100 for Nasdaq / US Index (future), i get only this list… (IG Markets)
Thanks.
NQXXXX is the nasdaq futures (mini).
As you can see I have a difference of about 117 points between the calculated pivot and the native one
Is it IG Markets ?
Have you changed something in the settings of PRT concerning the hours ?
Can you put 5 min time frame and zoom at the begining of the week and show the time at the bar before and the bar at the change of the week ? (like i did)
Oui, mais on va rajouter l’indicateur suivant en bas des prix et mettre le pivot daily de PRT sur les prix, pour voir le décalage (s’il y en a).
ONCE DayH = high
ONCE DayL = low
ONCE DayC = close
ONCE FullDay = 0
ONCE FullWeek = 0
ONCE FullMonth = 0
IF (OpenTime=010000 and dayofweek<>1) or (dayofweek<DAYOFWEEK[1]) THEN
if dayofweek <> 1 or (dayofweek<DAYOFWEEK[1]) THEN
PivotDuJour = (DHigh(1) + DLow(1) + DClose(1)) / 3
elsif dayofweek = 1 then
PivotDuJour = (DHigh(2) + DLow(2) + DClose(2)) / 3
endif
MonthH = max(MonthH,DayH)
MonthL = min(MonthL,DayL)
MonthC = DayC
WeekH = max(WeekH,DayH)
WeekL = min(WeekL,DayL)
WeekC = DayC
pDayofWeekI = DayofWeekI
pDayI = DayI
pDayH = DayH
pDayL = DayL
pDayC = DayC
DayofWeekI = DayofWeek
DayI = Day
DayH = High
DayL = Low
DayC = Close
If FullDay then
DayPivot = (pDayH + pDayL + pDayC)/3
Else
DayPivot = undefined
FullDay = 1
Endif
If DayofWeekI < pDayofWeekI then
pWeekH = WeekH
pWeekL = WeekL
pWeekC = WeekC
WeekH = High
WeekL = Low
WeekC = Close
If FullWeek then
WeekPivot = (pWeekH + pWeekL + pWeekC)/3
Else
WeekPivot = undefined
FullWeek = 1
Endif
//drawvline(barindex)
Endif
If DayI < pDayI then
pMonthH = MonthH
pMonthL = MonthL
pMonthC = MonthC
MonthH = High
MonthL = Low
MonthC = Close
If FullMonth then
MonthPivot = (pMonthH + pMonthL + pMonthC)/3
Else
MonthPivot = undefined
FullMonth = 1
Endif
//drawvline(barindex)
Endif
ENDIF
DayH = max(DayH,high)
DayL = min(DayL,low)
DayC = close
Return WeekPivot style(line,4) coloured("purple",160), DayPivot style(line,2) coloured("blue",160)
It would be cool if someone else could test this and let us know if dailypivot works (as for me) or not (as for Jerome888)