PureBytes Links
Trading Reference Links
|
At 08:19 AM 7/18/2002, you wrote:
>I am trying to build a custom indicator that will allow me to plot daily
>pivot points and the associated supports and resistance levels. For
>example if I am working with a 5 minute S&P 500 chart I would like to
>see the indicators based on the last sessions closes plotted in a
>straight line for the entire trading session. When the market closes
>recalculate the indicators and plot them for the next day.
Here is how I do it with a custom indicator (you will need to change open
and close times based upon the security and your timeframe):
YH1:= HighestSince(1,( Hour()= 8 AND Minute()=30),HIGH);
YH:= ValueWhen(1,Hour()=15 AND Minute()=15, YH1);
YL1:= LowestSince(1,( Hour()= 8 AND Minute()=30),LOW);
YL:= ValueWhen(1,Hour()=15 AND Minute()=15, YL1);
YO:= ValueWhen(2,Hour()= 8 AND Minute()=30, OPEN);
YC:= ValueWhen(1,Hour()=15 AND Minute()=15, CLOSE);
PP:= (YH + YC + YL + YO) / 4;
S1:= (2 * PP) - YH;
S2:= PP - YH + YL;
R1:= (2 * PP) - YL;
R2:= PP + YH - YL
HTH,
24h
|