logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
lilly  
#1 Posted : Thursday, August 10, 2006 8:00:58 PM(UTC)
lilly

Rank: Member

Groups: Registered, Registered Users, Subscribers
Joined: 5/27/2005(UTC)
Posts: 17

I just purchased the PP+ plug-in. I have a question about how you can plot an indicator from a higher time frame on a lower time frame.

for example how can I plot a weekly MACD on a daily chart using PP+ ?

Thank you

Lilly

henry1224  
#2 Posted : Thursday, August 10, 2006 8:30:08 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)

MACD w TDC

Per1:=Input("Length of Fast MA",3,100,12);
Per2:=Input("Length of Slow MA",5,200,26);
Per3:=Input("Length of Sig",3,200,9);
cFactor:=Input("Factor",1,1000,1);
TDClose:=ExtFml("PowerPivots.TDataCreate",3, cFactor);
MA:=Mov(TDClose,Per1,E)-Mov(TDClose,Per2,E);
Sig:=Mov(MA,Per3,E);
MA:=ExtFml("PowerPivots.TDataLocalize", MA, cFactor, 0);
Sig:= ExtFml("PowerPivots.TDataLocalize", Sig, cFactor, 0);
Hist:=MA-Sig;
MA;
Sig;
Hist;

Use a factor =2 for a weekly MACD on a daily Chart

henry1224  
#3 Posted : Thursday, August 10, 2006 8:34:16 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)

You may also download this file

http://forum.equis.com/files/3015/metastock_files/entry19667.aspx

and then just double click on it to import the formulas

All new formulas have PP+ in front of the name

Dwer  
#4 Posted : Sunday, October 8, 2006 9:45:13 AM(UTC)
Dwer

Rank: Newbie

Groups: Registered, Registered Users
Joined: 12/3/2005(UTC)
Posts: 4

henry1224 wrote:

MACD w TDC

Per1:=Input("Length of Fast MA",3,100,12);
Per2:=Input("Length of Slow MA",5,200,26);
Per3:=Input("Length of Sig",3,200,9);
cFactor:=Input("Factor",1,1000,1);
TDClose:=ExtFml("PowerPivots.TDataCreate",3, cFactor);
MA:=Mov(TDClose,Per1,E)-Mov(TDClose,Per2,E);
Sig:=Mov(MA,Per3,E);
MA:=ExtFml("PowerPivots.TDataLocalize", MA, cFactor, 0);
Sig:= ExtFml("PowerPivots.TDataLocalize", Sig, cFactor, 0);
Hist:=MA-Sig;
MA;
Sig;
Hist;

Use a factor =2 for a weekly MACD on a daily Chart

Hi,

Sorry that my first intervention in the forum is a negative one. The code above may lead you into false results if used in a system. Other then mondays, the values plotted by the code will be hindisight, just like the zigzag function.

For instance, the last plateau (or the last bar dependig how you are plotting it) of the histogram will only be determined on friday, after closing. So you just have safe values on mondays (after the friday close). Using this on a system will lead you to tremendous but unfortunately false results.

Try it yourselves.

PS: sorry for the poor english, it is not my native language.

henry1224  
#5 Posted : Thursday, October 12, 2006 8:37:10 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)

Dwer, Are you using the code as a cross function ?

Or are you using the ma > sig or MA < Sig and then go looking for a signal from the lower time frame to validate the bullish or bearish signal.

the problem occurs from the use of the cross function in higher time frame indicators, since metastock requires 2 bars to validate, in a higher time frame it could be twice as long as the lower time frame

in live RT bars the ma could cross back and forth, several times until the final close of that time frame, Metastock gets confused

Spaceant  
#6 Posted : Saturday, October 14, 2006 12:13:25 AM(UTC)
Spaceant

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 8/16/2005(UTC)
Posts: 182

Henry,

A couple of things:-

I have tried to click the HenryPP+Tools, it says "No importable files exist in the source files".... why is that? Please help. BTY, how many formulae are there in the tool?

Secondly, I remember that it used to have a thread called Henry' corner where I can find a lot of formulae, expert advisors, system testers, ecplorers using PP+. Where is that now as I can't find it?

Thanks!

sa
Dwer  
#7 Posted : Tuesday, October 17, 2006 8:48:35 AM(UTC)
Dwer

Rank: Newbie

Groups: Registered, Registered Users
Joined: 12/3/2005(UTC)
Posts: 4

henry1224 wrote:

Dwer, Are you using the code as a cross function ?

Or are you using the ma > sig or MA < Sig and then go looking for a signal from the lower time frame to validate the bullish or bearish signal.

the problem occurs from the use of the cross function in higher time frame indicators, since metastock requires 2 bars to validate, in a higher time frame it could be twice as long as the lower time frame

in live RT bars the ma could cross back and forth, several times until the final close of that time frame, Metastock gets confused

Hi Henry,

Take a look at this code

Cl:=ExtFml("PowerPivots.TDataCreate",3,2);

ema1:=Mov(Cl,12,E) ;
ema2:=Mov(Cl,26,E) ;
mac:=ema1-ema2;
sig:=Mov(mac,9,E) ;
his:=mac-sig;
mac1:=ExtFml("PowerPivots.TDataLocalize",mac,2,0);
sig1:=ExtFml("PowerPivots.TDataLocalize",sig,2,0);
his1:=ExtFml("PowerPivots.TDataLocalize",his,2,0);

0;his1

If you try to plot you will see that it is only correct on monday. In the other days is 'dynamic'. One can not build a system over this data. The system I have write asked wether his1>ref(his,-5); if so and if his>0, it would go long; if his1<ref(his1,-5) and his1<0 it would go short. The system returned tremendous results. After a wile I understood why. The system would enter the trade on the monday prior to the friday that settled the week. With such an advance it was no wonder that it gave such wonderful results.

hayseed  
#8 Posted : Tuesday, October 17, 2006 5:56:52 PM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey gary.... henrys file was from back when we were using 9.1 ... if your trying to download into some other version it likely will not work.... we need create the same exe downloads for the other versions......

can't remember off hand how many indicators are involved but it is a considerable number.... possibly around 50.....h

Spaceant  
#9 Posted : Tuesday, October 17, 2006 6:54:13 PM(UTC)
Spaceant

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 8/16/2005(UTC)
Posts: 182

Hayseed and others,

Mine is MS 9.0. I would be delighted if someone could create the same exe downloads for this version.

regards,

sa
henry1224  
#10 Posted : Tuesday, October 17, 2006 7:33:06 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)

Try this

64H:=Mov(Ref(H,-4),6,S);
64L:=Mov(Ref(L,-4),6,S);
Cl:=ExtFml("PowerPivots.TDataCreate",3,2);
ema1:=Mov(Cl,12,E) ;
ema2:=Mov(Cl,26,E) ;
mac:=ema1-ema2;
sig:=Mov(mac,9,E) ;
his:=mac-sig;
mac1:=ExtFml("PowerPivots.TDataLocalize",mac,2,0);
sig1:=ExtFml("PowerPivots.TDataLocalize",sig,2,0);
his1:=ExtFml("PowerPivots.TDataLocalize",his,2,0);
D:=If(C>=64H AND His1>0,1,If(C<=64L AND His1<0,-1,0));
D=1 AND Ref(D,-1)<1{Long entry}

henry1224  
#11 Posted : Tuesday, October 17, 2006 7:44:16 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)

Dwer,

your formula

Cl:=ExtFml("PowerPivots.TDataCreate",3,2);
ema1:=Mov(Cl,12,E) ;
ema2:=Mov(Cl,26,E) ;
mac:=ema1-ema2;
sig:=Mov(mac,9,E) ;
his:=mac-sig;
mac1:=ExtFml("PowerPivots.TDataLocalize",mac,2,0);
sig1:=ExtFml("PowerPivots.TDataLocalize",sig,2,0);
his1:=ExtFml("PowerPivots.TDataLocalize",his,2,0);

0;His1;

any time you use a Ref Function after you localize the data, it is used on the lower time frame, if you use the ref function before the localized data, it is used on the higher time frame

Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.