PureBytes Links
Trading Reference Links
|
Hi Group,
In Anthony Faragasso's Stochastic of Weekly array the code produces a
week starting Friday and finishing Thursday. Not Monday to Friday
which I assumed it would do.
I am attempting to use this code to produce weekly Pivot Points with
Resistance and Support on the daily chart. All worked quite well
except the actual days of the week were incorrect.
Does Anthony or anyone else know how I can overcome this problem.
The code is as follows;
//Support and Resistance levels
weekstart = DayOfWeek() < Ref( DayOfWeek(), -1 );
weekend = DayOfWeek() > Ref( DayOfWeek(),1);
/**Establish Weekly Price arrays**/
WeeklyOpen=ValueWhen(DayOfWeek()< Ref(DayOfWeek(),-1) ,Open);
WeeklyHigh = ValueWhen( weekend, HighestSince( weekstart, High ) );
WeeklyLow = ValueWhen( weekend, LowestSince( weekstart, Low ) );
WeeklyClose=ValueWhen(DayOfWeek() > Ref( DayOfWeek(),1),Close);
WeeklyVolume=ValueWhen(DayOfWeek() > Ref(DayOfWeek(),1),Sum(V,5));
P=(WeeklyHigh+WeeklyLow+WeeklyClose)/3;
R1=(P*2)-WeeklyLow;
R2=P+WeeklyHigh-WeeklyLow;
S1=(P*2)-WeeklyHigh;
S2=P-WeeklyHigh+WeeklyLow;
Plot(P,"P",colorBlack,styleLine);
Plot(R1,"R1",colorIndigo,styleDots);
Plot(R2,"R2",colorBlue,styleThick);
Plot(S1,"S1",colorIndigo,styleDots);
Plot(S2,"S2",colorRed,styleThick);
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|