PureBytes Links
Trading Reference Links
|
For your Weekly OHLC, try this:
===========
Weekly OHLC
===========
---8<--------------
{ Plots weekly OHLC values on daily charts }
{ References "Calendar Week counter" }
{ ©Copyright 2004~2005 Jose Silva
The grant of this license is for personal use
only - no resale or repackaging allowed.
http://www.metastocktools.com }
{ User input }
pds:=Input("Last x week's OHLC",1,52,1);
{ Message }
message:=Input("(Plot on daily charts)",0,0,0);
{ Week's true start }
wkCount:=Fml("Calendar Week counter");
nuWeek:=wkCount>ValueWhen(2,1,wkCount);
{ Adjust plot for non-daily charts }
adj:=LastValue(Cum(
wkCount=ValueWhen(2,1,wkCount)))=0;
{ Previous x Week's Open }
wkO:=ValueWhen(pds-adj+1,nuWeek,O);
wkO:=ValueWhen(1,wkO>0,wkO);
{ Previous x Week's High }
wkH:=ValueWhen(pds,nuWeek,
Ref(HighestSince(1,nuWeek,H),-1+adj));
wkH:=ValueWhen(1,wkH>0,wkH);
{ Previous x Week's Low }
wkL:=ValueWhen(pds,nuWeek,
Ref(LowestSince(1,nuWeek,L),-1+adj));
wkL:=ValueWhen(1,wkL>0,wkL);
{ Previous x Week's Close }
wkC:=ValueWhen(pds,nuWeek,Ref(C,-1+adj));
wkC:=ValueWhen(1,wkC>0,wkC);
{ Plot on Daily charts }
wkO;wkH;wkL;wkC
---8<--------------
You can find the "Calendar Week counter" indicator at:
http://www.metastocktools.com/#metastock
jose '-)
--- In Metastockusers@xxxxxxxxxxxxxxx, "wozniukvic" <wozniukvic@xxxx>
wrote:
>
> I am looking for a metastock exploration formulation that will allow
> me to scan stocks for the following properties:
>
> A doji candlestick on a daily chart that appears at or close to the
> S1 or S2 price point and is then followed the next day with a close
> that is higher than the high of the previous day's doji.
>
> S1 is equal to 2*(H+L+C)/3)-H
> S2 is equal to (H+L+C)/3)-H+L
>
> THE PART I DON"T KNOW HOW TO FORMULATE IS THAT H, L, C are the
> High, Low and Close on the previous WEEK's price chart
>
> I would also like to have available in my exporation the H, L and C
> of the previous months price chart.
>
> Thanks
------------------------ Yahoo! Groups Sponsor --------------------~-->
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/zMEolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Metastockusers/
<*> To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|