How to calculate daily pivot point ?
4 replies
stickytrader
7 years ago #248251
I’m trying to calculate daily pivot point on AlgoWizard (Pivot point (PP) = (High + Low + Close) / 3)
Every day on 00:00 I need to know if the current price is lower/higher than daily pivot point ( which refers to last 24hours ) . I tried these codes but none of them worked properly :
1:

2:

3:

The third one works but it is not accurate because Indicator Highest(0,1 SMA(1)[1] )returns the highest close/lowest close instead of high/low of price .
0
Tomas Matejka
7 years ago #248277
Hello,
this is how you can easily calculate yesterday’s pivot price at 00:00 o’clock
0
stickytrader
7 years ago #248282
Thanks for the reply, but I need to have today’s pivot price on 00:00 o’clock which is ( ( yesterday high + yesterday low + yesterday close price ) / 3 )
0
Tomas Matejka
7 years ago #248306
I am not sure I understand. What I showed is the pivot price for today’s session calculated using previous trading session data … today’s pivot cannot be calculated from today’s data since there are none at 00:00
0
stickytrader
7 years ago #248318
I have tested your code, it returns yesterdays pivot unless I change the IF CONDITION current time to 01:00 , but for the 00:00 o’clock it returns yesterday’s pivot ( which is calculated by data of 2 days ago ).
0
Viewing 4 replies - 1 through 4 (of 4 total)