[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Metastockusers] Pivots



PureBytes Links

Trading Reference Links

Below I have pasted the code I'm using for generating two pivot points.

You will notice that it plots the values on the current bar, so when trading
in real time, the pivots are always moving based on the last price and
therefore they act as a moving support/resistance.

How do I NOT INCLUDE the current bar in the calculation?  That way I can use
the closed bars' plots as my levels for the current bar?

periods:=Input("ATR Periods?",1,100,10);
TH:=If(Ref(C,-1) > H,Ref(C,-1),H);
TL:=If(Ref(C,-1) < L,Ref(C,-1),L);
TR:=TH-TL;
R#1:=C+Mov(TR,periods,S);
S#1:=C-Mov(TR,periods,S);
R#1;
S#1;


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/zMEolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/