MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

 A B C D E F G H I J K L M N O P R S T U V W Y Z #

Dynamic Multiple Time Frames II
Re Multiple Time Frames

* To: Majordomo@xxxxxxxxxxxxxxxxxx
* Subject: Re Multiple Time Frames
* From: "Ugo Nwaozuzu" <ugo_nwaozuzu@xxxxxxxxxxx>
* Date: Sun, 15 Oct 2000 10:39:39 GMT
* Cc: metastock@xxxxxxxxxxxxx
* Sender: owner-metastock@xxxxxxxxxxxxx

A while ago I mailed to the list regarding multiple time-frames. I got afew suggestions. Some worked but most did not. Thanks to Glen Wallace, Craig Monroe and mike "mtg" for their comments.

Not so long ago, I got codes for "Dynamic Multiple Time Frames" from the Equis website and some modification of those by a certain Adam Hefner (on the Guppy website).

The formulas essentially do the following:
Using daily data,
1. extract the weekly high,weekly low,weekly close and weekly range,
2. use the extractions to calculate the weekly balance points and weekly supports and resistances,
3. plot these lines on a daily chart.

The coding is reproduced below.

Dynamic Multiple Time Frames II

Dw:=If(DayOfWeek()<=Ref(DayOfWeek(),-1),1,0);
Wt:=If(Dw=1,Ref(HighestSince(1,Dw=1,H),-1) +
Ref(LowestSince(1,Dw=1,L),-1)+Ref(C,-1)/3,0);
Wh:=If(Dw=1,Ref(HighestSince(1,Dw=1,H),-1),0);
Wl:=If(Dw=1,Ref(LowestSince(1,Dw=1,L),-1),0);
Wr:=ValueWhen(1,Wh>0,Wh)-ValueWhen(1,Wl>0,Wl);
DwP:=ValueWhen(1,Wt>0,Wt);
Rs1:=DwP+(Wr*0.5);
Rs2:=DwP+(Wr*0.618);
Sp1:=Dwp-(Wr*0.5);
Sp2:=DwP-(Wr*0.618);
Rs2;
Rs1;
Sp1;
Sp2;

Now, these do work (with a few qirks, but never mind).

So I have been trying to adapt these for chart plots on a lower time frame.The intention is to: Use hourly data,
1. extract the daily high,daily low,daily close and daily range,
2. use these extractions to calculate the daily balance points, daily supports and resistances,
3. plot the lines on an hourly chart.

I have tried to do this by
a)substituting daily bars with hourly bars (duh!),
b)using hour() functions instead of DayOfWeek() functions,
c)using no. of trading hours in a day for the instrument(7)instead of the no. of days in a week(5).

But nothing works .Obviously two months is not enough to understand the intricaces of Metastock formula coding.

Can somebody give me a hand with this thing ,or tell me where I can get equivalent coding.

Ugo

[22696]

Source / From: TOP
http://purebytes.com/archives/metastock/

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.