Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 1/23/2011(UTC) Posts: 9
|
Hello, An absolute newby here. My first message, am I in the right section, can anyone see this??? I have just studied the MetaStock Formula Primer, have many ideas I would like to turn into formulae, my first couple get me close to what I want to find, though lack the experience to refine the formula. Would like to use the right etiquette, please
|
|
|
|
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)
|
Yes we can see your post.
With your code: If you get stuck,
help is available here on the Forum. Just post your best attempt at the
code along with a full explanation of what you are trying to achieve
and an explanation why your code is not achieving this (pictures often speak more than words) and one of the
Forum members will give some of their time to help you.
wabbit [:D]
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 1/23/2011(UTC) Posts: 9
|
That's awsome, here's the formula so far, If((ADX(14)>+25) AND (C>=(Mov(C,20,E))*0.90) AND (C<=(Mov(C,20,E)*1.05)),1,0).
I have loaded it into the filter tab of the explorer searching for any stocks that have the ADX above 25 and the close in the range between 5% above the 20 day MA and 10% below. Is there a way to show a pivot point, instead of just the close, in this area?
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 1/23/2011(UTC) Posts: 9
|
That's not right, not sure what happened. this is the formula, If((ADX(14)>+25) AND (C>=(Mov(C,20,E))*0.90) AND (C<=(Mov(C,20,E)*1.05)),1,0)
|
|
|
|
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)
|
Risoma wrote:That's not right, not sure what happened. this is the formula, If((ADX(14)>+25) AND (C>=(Mov(C,20,E))*0.90) AND (C<=(Mov(C,20,E)*1.05)),1,0) Replace the "C" with a variable containing the value of how you define your "pivot" Also, you don't need the If() as MS will return a Boolean true (1) if the condition is met, false (0) otherwise. Code:
{filter}
pivot:={your definition goes here};
ma:=Mov(C,20,E);
ADX(14)>25 AND
pivot>=(ma*0.90) AND
pivot<=(ma*1.05);
wabbit [:D]
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 1/23/2011(UTC) Posts: 9
|
My def of a pivot is a close today higher than close yesterday. therefore,
pivot:={c>c-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)
|
On the bar when: C > Ref(C,-1); what value are giving for pivot? e.g. Code:
pivot:=valuewhen(1,C>Ref(C,-1),(C+Ref(C,-1))/2);
or whatever.... wabbit [:D]
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 1/23/2011(UTC) Posts: 9
|
I am unsure of your question, do you mean show a 1 else show 0? or todays close must be atleast 1 point higher than yesturdays close?
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 1/23/2011(UTC) Posts: 9
|
Just read the function Value When in the manual that came with the disk, I understand the first half: (the last time c was greater than yesturdays c), ( close + yesturdays close divided by 2). I'm just unsure and inexperienced.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 1/23/2011(UTC) Posts: 9
|
Thanks Wabbit, Time has got me, I'm on the east coast, work tomorrow and my brain is a little fried trying to quickly ref to manual to understand it all. Thanks for sharing, will hopfully gain more experience from you later in the week. Bye.
|
|
|
|
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.