Rank: Newbie
Groups: Registered, Registered Users Joined: 7/7/2012(UTC) Posts: 6
|
I wish to run a DAILY test that will show me when, on a daily basis , the MACD in MONTHLY mode has changed direction either up or down .
Hope someone can help .... with thanks.
Bumless.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
Code:
{Monthly direction/signal on Daily Periodicity}
Plot:=Input("1=Signal 2=Monthly MACD",1,2,1);
FastPeriod:=12*21; {252}
SlowPeriod:=26*21; {546}
MAFast:=Mov(C,FastPeriod,E);
MASlow:=Mov(C,SlowPeriod,E);
x:=MAFast-MASlow;
x2:=Ref(x,-1);
Entry:=x>x2;
Exit:=x<x2;
Signal:=Entry-Exit;
If(Plot=2,x,Signal<>Ref(Signal,-1));
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers, Unverified Users Joined: 10/28/2004(UTC) Posts: 3,111 Location: Perth, Western Australia
Was thanked: 16 time(s) in 16 post(s)
|
Just select the time frame in the exploration as monthly and run the explorer each day.
wabbit [:D]
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 7/7/2012(UTC) Posts: 6
|
Dear jjstein,
I entered the data in the explorer editor and it was rejected.
Greatly appreciate any further comments.
Bumless.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 7/7/2012(UTC) Posts: 6
|
Dear wabbit,
My exploration list does not appear to have a basic MACD on it .
Greatly appreciate any further comments.
Bumless.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
INPUT statements are not directly allowed in an Exploration -- you can either: 1. "Call" the indicator using FML(), or 2. Copy the code, then change the PLOT variable. Code:
{Monthly direction/signal on Daily Periodicity}
{Plot:=Input("1=Signal 2=Monthly MACD",1,2,1);} <-- add braces
Plot:=1; <-- add this line
FastPeriod:=12*21; {252}
SlowPeriod:=26*21; {546}
MAFast:=Mov(C,FastPeriod,E);
MASlow:=Mov(C,SlowPeriod,E);
x:=MAFast-MASlow;
x2:=Ref(x,-1);
Entry:=x>x2;
Exit:=x<x2;
Signal:=Entry-Exit;
If(Plot=2,x,Signal<>Ref(Signal,-1));
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 7/7/2012(UTC) Posts: 6
|
Dear Jjstein,
Sorry to bother you again, but still can't get it to work .
Is what i am trying to do , possible ?
Bumless.(may have to change this to Hopeless)
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
You're going to have to be more specific. What does "still can't get it to work" mean:
1. You get an error msg when entering code. 2. You have a problem plotting the Indicator. 3. You don't get the results you expect from the Exploration.
Also, if you new to MetaStock, or are you unfamiliar with certain features, say so. If you have not worked your way through the Formula Primer, now would be a good time to do so. If you don't understand how the different features work separately/together, you will not know what to expect in the way of results.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 7/7/2012(UTC) Posts: 6
|
Dear Jjstein,
Thank you for your patience.
After Explorer New , and entering the formula , I get an error message .
I take your point on the Formula Primer....... I don't have one , and if I did , sadly for me , it would be of doubtful use , as,skill in that area for me is non-existent ....... which is basically why I am seeking assistance .
Bumless.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 5/13/2005(UTC) Posts: 715 Location: Midwest, USA
Was thanked: 1 time(s) in 1 post(s)
|
bumless wrote:I take your point on the Formula Primer....... I don't have one 1. It's free. You can download the primer by clicking the link below my signature. bumless wrote:...if I did , sadly for me , it would be of doubtful
use , as,skill in that area for me is non-existent ....... which is
basically why I am seeking assistance .
Bumless.
Work your way through it. You need at least a minimum working knowledge of MetaStock, or you will not be able to ask intelligent questions or be able to understand any answers you get. The people here are mostly volunteers, so you need to make the effort to at least meet them halfway. If you can't manage that, try some of the free LearnMetastock.com videos. bumless wrote:After Explorer New , and entering the formula , I get an error message. Mark the code below, then click COPY (or hit CTRL C). Then, ALT TAB to MetaStock, create a new Exploration, click the FILTER tab and PASTE the code. Then, click the OPTIONS button and make sure USE FILTER is checked. Code:
{Monthly direction/signal on Daily Periodicity}
{Plot:=Input("1=Signal 2=Monthly MACD",1,2,1);}
Plot:=1;
FastPeriod:=12*21; {252}
SlowPeriod:=26*21; {546}
MAFast:=Mov(C,FastPeriod,E);
MASlow:=Mov(C,SlowPeriod,E);
x:=MAFast-MASlow;
x2:=Ref(x,-1);
Entry:=x>x2;
Exit:=x<x2;
Signal:=Entry-Exit;
If(Plot=2,x,Signal<>Ref(Signal,-1));
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 7/7/2012(UTC) Posts: 6
|
Dear Jjstein,
Have d/loaded the primer and taken your "halfway " comment to heart .
I have the formula working but not quite as I want ,so will try to work it out myself with the aid of the Primer.
Greatly appreciate your time and help.
Bumless.
|
|
|
|
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.