PureBytes Links
Trading Reference Links
|
Alvin,
No problem!
By calling the variable, you must add the name to the end of the
formula like this:
stp:=12; {periods of the short-term ema}
ltp:=26; {periods of the long-term ema}
slp:=9; {periods of the MACD's signal line}
g:=3; {periods of consecutive higher values of the MACD's Histogram}
r:=3; {periods of consecutive lower values of the MACD's Histogram}
md:=mov(c,stp,e)-mov(c,ltp,e); {This is MACD}
mmd:=mov(md,slp,e); {MACD's singal line}
mdh:=md-mmd; {MACD's Histogram}
rmd:=roc(mdh,1,$); {Roc of MACD's Histogram}
buy:=rmd>0 and barssince(ref(rmd>0,-1))>=r; {We buy when we have
MACD's Histogram turning up plus there have been r-bars of MACD
Histogram consecutive lower values}
BUY;
or like this:
stp:=12; {periods of the short-term ema}
ltp:=26; {periods of the long-term ema}
slp:=9; {periods of the MACD's signal line}
g:=3; {periods of consecutive higher values of the MACD's Histogram}
r:=3; {periods of consecutive lower values of the MACD's Histogram}
md:=mov(c,stp,e)-mov(c,ltp,e); {This is MACD}
mmd:=mov(md,slp,e); {MACD's singal line}
mdh:=md-mmd; {MACD's Histogram}
rmd:=roc(mdh,1,$); {Roc of MACD's Histogram}
sell:=rmd<0 and barssince(ref(rmd<0,-1))>=g; {we sell when we have
MACD's Histogram turning down plus there have been g-bars of MACD's
Histogram consecutive higher values}
SELL;
Equis has several manuals that can help you learn the format and
lanquage. A programming guide can be found at the Equis and the
users manual can be found in our files section. These are excellent
guides/learning tools.
I haven't had a chance to work on this yet but should have something
for you shortly.
Preston
--- In equismetastock@xxxxxxxxxxxxxxx, Alvin Yu <alvinyu2005@xxx>
wrote:
>
> Hi Preston
> Â Â Â Thks.As I am not sofamiliar with programming, so I do not
know how to implement your advice. Can u teach a little more on
this ?
> rgds
>
>
>
>
> ________________________________
> From: pumrysh <no_reply@xxxxxxxxxxxxxxx>
> To: equismetastock@xxxxxxxxxxxxxxx
> Sent: Sunday, 28 December 2008 5:41:12
> Subject: [EquisMetaStock Group] Re: MACD Histogram Cycle and
Trigger with 4 Green 1 Red or 4 Red 1 Green
>
>
> Alvin,
>
> You must call the variable by using either
>
> Buy;
>
> or
>
> Sell;
>
> Preston
>
> --- In equismetastock@ yahoogroups. com, Alvin Yu
<alvinyu2005@ ...>
> wrote:
> >
> > Hi MC/Preston
> > � � � Tried this but get a blank screen� even I
changed the ")"
> to "}" at the last sentence .
> >
> > � � � Anu clue ?
> >
> > rgds
> >
> >
> >
> >
> >
> > ____________ _________ _________ __
> > From: p_panther_73 <mchantzi@ .>
> > To: equismetastock@ ...
> > Sent: Sunday, 28 December 2008 4:03:54
> > Subject: [EquisMetaStock Group] Re: MACD Histogram Cycle and
> Trigger with 4 Green 1 Red or 4 Red 1 Green
> >
> >
> > Hi there,
> >
> > It seems to be that you want something like this:
> >
> > stp:=12; {periods of the short-term ema}
> > ltp:=26; {periods of the long-term ema}
> > slp:=9; {periods of the MACD's signal line}
> > g:=3; {periods of consecutive higher values of the MACD's
Histogram}
> > r:=3; {periods of consecutive lower values of the MACD's
Histogram}
> >
> > md:=mov(c,stp, e)-mov(c, ltp,e); {This is MACD}
> > mmd:=mov(md, slp,e); {MACD's singal line}
> > mdh:=md-mmd; {MACD's Histogram}
> > rmd:=roc(mdh, 1,$); {Roc of MACD's Histogram}
> >
> > buy:=rmd>0 and barssince(ref( rmd>0,-1) )>=r; {We buy when we
have
> > MACD's Histogram turning up plus there have been r-bars of MACD
> > Histogram consecutive lower values}
> >
> > sell:=rmd<0 and barssince(ref( rmd<0,-1) )>=g; {we sell when we
have
> > MACD's Histogram turning down plus there have been g-bars of
MACD's
> > Histogram consecutive higher values)
> >
> > Please note, that a) I don't have metaStock on this pc, so I
didn't
> > actually check the validity of the code and b) I'm not quite
sure
> that
> > this is what is described in the link that was given.
> >
> > Regards,
> >
> > mc
> >
> > --- In equismetastock@ yahoogroups. com, Alvin Yu
> <alvinyu2005@ ...> wrote:
> > >
> > > Hi Preston
> > > Ã?â??Ã? Ã?â??Ã? Ã?â??Ã? MyÃ?â??Ã? "not tally" mean " the
number of green bars
> or red bars
> > are not the same as for the 2 charts " Example as follow:
> > >
> > > Ã?â??Ã? Ã?â??Ã? Ã?â??Ã? Ã?â??Ã? 1st to 10thÃ?â??Ã? bars
(from Right) are all RED
> inÃ?â??Ã? Chartnexus
> > but it shows 4 Green & 6 "Red" in Metastock
> > > Ã?â??Ã? Ã?â??Ã? Ã?â??Ã?Â
> > > Ã?â??Ã? Ã?â??Ã? Ã?â??Ã? Ã?â??Ã? It seems that they are
some comparison on the
> price data
> > betweenÃ?â??Ã? as the trigger is formulated when the
barschanged from
> red
> > to greenÃ?â??Ã? & vise versa . The Chartnexus web shows some
info on
> MACD
> > Histogram cycleÃ?â??Ã? but may not be detail enough .
> > > Ã?â??Ã? Ã?â??Ã? Ã?â??Ã?Â
> > http://www.chartnex us.com/learning/ manual/add- ons/node26.
> html#SECTION0041 1600000000000000 0
> > >
> > > Ã?â??Ã? Ã?â??Ã? Ã?â??Ã? Hope It is not too troubling
uÃ?â??Ã? to help me on
> this formula
> > >
> > > rgds
> > >
> > >
> > >
> > >
> > > ____________ _________ _________ __
> > > From: pumrysh <no_reply@xxxxxxxxx p s.com>
> > > To: equismetastock@ yahoogroups. com
> > > Sent: Thursday, 25 December 2008 2:19:44
> > > Subject: [EquisMetaStock Group] Re: MACD Histogram Cycle and
> Trigger
> > with 4 Green 1 Red or 4 Red 1 Green
> > >
> > >
> > > Alvin,
> > >
> > > What I gave you will work just like the pic.
> > >
> > > In order to get the style and colors you want you must right
> click
> > > on the indicator and change to the color and style that you
want.
> > > This is covered in the users manual as well.
> > >
> > > Preston
> > >
> > > --- In equismetastock@ yahoogroups. com, Alvin Yu
> <alvinyu2005@ ....>
> > > wrote:
> > > >
> > > > Hi Preston
> > > >
Ã?Æ'�Ã?â??Ã? Ã?Æ'�Ã?â??Ã? Ã?Æ'�Ã?â??Ã?Â
Sorry I did not get
> this clear enough .My actual
> > needs as
> > > follow:
> > > >
> > > > Ã?Æ'�Ã?â??Ã? MACD Histogram (MACDH) to show the
following:
> > > >
> > > > 1. When MACDH > 0 AND MACDH(t) > MACDH(t-1), output on the
> > > histogram is GREEN in colour.
> > > > 2. When MACDH > 0 AND MACDH(t) < MACDH(t-1), output on the
> > > histogram is RED in colour.
> > > > 3. When MACDH < 0 AND MACDH(t) < MACDH(t-1), output on the
> > > histogram is RED in colour.
> > > > 4. When MACDH < 0 AND MACDH(t) > MACDH(t-1), output on the
> > > histogram is GREEN in colour.
> > > >
> > > > Note: (t) denotes the most recent MACDH value, (t-1) denotes
> the
> > > value of MACDH one period before
> > > >
> > > > I saw this in the following web siteÃ?Æ'�Ã?â??Ã?Â
but I could
> notÃ?Æ'�Ã?â??Ã? find the
> > > solution:
> > > > http://forum. vtsystems. com/index. php?
> > > s=88fe854d789faa450 28153615fba14ed& showtopic= 9256&pid=
> 40576&st=
> > 0&#ent
> > > ry40576
> > > >
> > > > Appreciate if u can help on this ..
> > > >
> > > > Merry Christmas and Happy New Year
> > > >
> > > > Ã?Æ'�Ã?â??Ã?Â
> > > >
> > > >
> > > >
> > > > ____________ _________ _________ __
> > > > From: pumrysh <no_reply@xxxxxxxxx p s.com>
> > > > To: equismetastock@ yahoogroups. com
> > > > Sent: Thursday, 18 December 2008 11:27:22
> > > > Subject: [EquisMetaStock Group] Re: MACD Histogram Cycle and
> > > Trigger with 4 Green 1 Red or 4 Red 1 Green
> > > >
> > > >
> > > > Alvin,
> > > >
> > > > At the group site you can search old messages by using key
> words
> > > such
> > > > as MACD RED GREEN. I did and came up with:
> > > >
> > > > A:=MACD();
> > > > B:=Mov(MACD( ),5,E);
> > > > A;B;
> > > >
> > > > {RedGreen MACD Histogram}
> > > > X:= MACD();
> > > > Green:=If(X> Ref(X,-1) ,X,0);
> > > > Red:=If(X<Ref( X,-1),X,0) ;
> > > > Green; Red;
> > > >
> > > > The neat thing about doing a search in this way is that it
goes
> > > all the
> > > > way back to 1999 when this group first started...literally
tons
> of
> > > > indictors since then.
> > > >
> > > > Preston
> > > >
> > > > --- In equismetastock@ yahoogroups. com, "alvinyu2005"
> > > <alvinyu2005@ ...>
> > > > wrote:
> > > > >
> > > > > Hi
> > > > > Can any adv if Metastock has an std program for this MACD
> that
> > > > > show :
> > > > > 1) Red & Green colour bars instead of one single colour ?
> (Note:
> > > > Green
> > > > > bars show the price is closed with higher low ) Similar to
> the
> > > one
> > > > > shown in Amibroker in
> > > > > http://www.amibroke r.org/userkb/ 2007/10/19/ macd-
histograms-
>
> > > v1/
> > > > >
> > > > > 2) How should I write a programme that can screen stocks
that
> > > satisfy
> > > > > continuous 4 Grren then next is 1 Red and/or 4 continuous
4
> Red
> > > &
> > > > > follow with 1 green ?
> > > > >
> > > > > rgds
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > > Happy Holidays from Yahoo! Messenger. Spread holiday cheers
> > > to your friends and loved ones today! Get started at
> > > http://emoticaroler s.com/
> > > >
> > >
> > > __.._,_.___
> > > Messages in this topic (4) Reply (via web post) | Start a new
> topic
> > > Messages | Files | Photos | Database | Polls
> > > MARKETPLACE
> > >
> > > ____________ _________ _________ __
> > > From kitchen basics to easy recipes - join the Group from
Kraft
> Foods
> > >
> > > Change settings via the Web (Yahoo! ID required)
> > > Change settings via email: Switch delivery to Daily Digest |
> Switch
> > format to Traditional
> > > Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
> > > Recent Activity
> > > * Ã?â??Ã? 8
> > > New MembersVisit Your Group
> > > Yahoo! News
> > > Get it all here
> > > Breaking news to
> > > entertainment news
> > > Yahoo! Finance
> > > It's Now Personal
> > > Guides, news,
> > > advice & more.
> > > Need traffic?
> > > Drive customers
> > > With search ads
> > > on Yahoo!
> > > .
> > >
> > >
> > >
> > > Yahoo! Toolbar is now powered with Search Assist.Download it
now!
> > > http://sg.toolbar. yahoo.com/
> > >
> >
> >
> >
> >
> > Yahoo! Toolbar is now powered with Search Assist..Download it
> now!
> > http://sg.toolbar. yahoo.com/
> >
>
>
> Messages in this topic (12) Reply (via web post) | Start a new
topic
> Messages | Files | Photos | Database | Polls
> MARKETPLACE
>
> ________________________________
> From kitchen basics to easy recipes - join the Group from Kraft
Foods
>
> Change settings via the Web (Yahoo! ID required)
> Change settings via email: Switch delivery to Daily Digest |
Switch format to Traditional
> Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
> Recent Activity
> * Â 13
> New MembersVisit Your Group
> Yahoo! News
> Fashion News
> What's the word on
> fashion and style?
> Yahoo! Finance
> It's Now Personal
> Guides, news,
> advice & more.
> Search Ads
> Get new customers.
> List your web site
> in Yahoo! Search.
> .
> __,_.._,___
>
>
> Get your new Email address!
> Grab the Email name you've always wanted before someone else
does!
> http://mail.promotions.yahoo.com/newdomains/sg/
>
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/equismetastock/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:equismetastock-digest@xxxxxxxxxxxxxxx
mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|