Hi Louies
I have modifed the standard MACD from the Indicators folder.
There are more efficient ways of coding this, but I hope this way
you can see what is happening clearly, it also allows you to change
the colours of the up and down via the Parameter dialog.
The changes have comments added at the end of the line.
I think there is a very similar example in the User Guide.
// BOF
r1 = Param( "Fast avg", 12, 2, 200, 1 );
r2 = Param( "Slow avg", 26, 2, 200, 1 );
r3 = Param( "Signal avg", 9, 2, 200, 1 );
Plot( ml = MACD(r1, r2), StrFormat(_SECTION_NAME()+"(%g,%g)", r1, r2), ParamColor("MACD color", colorRed ), ParamStyle("MACD style") );
Plot( sl = Signal(r1,r2,r3), "Signal" + _PARAM_VALUES(), ParamColor("Signal color", colorBlue ),
ParamStyle("Signal style") );
upColor = ParamColor( "Up Color", colorLime); // Addition
dnColor = ParamColor( "Down Color", colorOrange ); // Addition
dynamicColor = IIf( ml-sl >=0, upColor, dnColor ); // Addition
Plot( ml-sl, "MACD Histogram",
dynamicColor, // Change
styleNoTitle | ParamStyle("Histogram style", styleHistogram | styleNoLabel, maskHistogram ) );
// EOF
Hope this helps
RZ
From: louies88 <Louies88@xxxxxxxxx>
To: amibroker@xxxxxxxxxxxxxxx
Sent: Thursday, 11 June, 2009 6:02:35 AM
Subject: [amibroker] Re: Managing many layouts-formulas
Hi there...
I was just wondering how can I get a MACD histogram w/ a vivid color like the one shown in the attachment? Mine is all one color. The default is gray. I can, of course, change it to different color via the parameter panel, but it won't have a color separation between the + and - areas. Anyone knows. Please share.
Thanks
--- In amibroker@xxxxxxxxx ps.com, dingo <waledingo@x ..> wrote:
>
> Nope! Won't work - not even if you crib an example.
>
> d
>
> On Wed, Jun 10, 2009 at 12:55 PM, Ton Sieverding
> <ton.sieverding@ ...>wrote:
>
> >
> >
> > Really not ? ModifyTABName( "Sheet 60","Last Sheet");
> >
> >
> > Regards, Ton.
> >
> >
> > ----- Original Message -----
> > *From:* dingo <waledingo@x ..>
> > *To:* amibroker@xxxxxxxxx ps.com
> > *Sent:* Wednesday, June 10, 2009 6:26 PM
> > *Subject:* Re: [amibroker] Re: Managing many layouts-formulas
> >
> > It is NOT possible using either AFL or COM .
> >
> > d
> > On Wed, Jun 10, 2009 at 11:55 AM, Ton Sieverding <
> > ton.sieverding@ ...> wrote:
> >
> >>
> >>
> >> Sure it's possible, Herman. Open an AWL in the Layout directory and modify
> >> the TAB names with the available low level AFL commands :
> >>
> >> 2454 100
> >> Brian Weekly SP
> >> 1
> >> 3087 100
> >> ETFRotation
> >> 1
> >> 1883 100
> >> Being Exploration
> >> 1
> >> 1291 100
> >> DonchianChannel
> >> 1
> >> 2100 100
> >> Sheet 28
> >> 1
> >> 0 50
> >> Sheet 29
> >> But that's not what I was asking for. I hoped some where some how there is
> >> an instruction called ModifyTabName( OldName, NewName). Or something like
> >> that. If not available it's my job to get that instruction programmed. Grey
> >> hairs and a lot of Java coffee... The idea is simple. AmiBroker handles the
> >> combination of an AFL and Symbol. Call it the AFLSymbol object. But
> >> AmiBroker does not provide me the facility to select this kind of objects.
> >> The user is opening an AFL. After that he/she selects the Symbol. I want to
> >> select the combination. You remember Partity Plus ( 1987 ) ?
> >>
> >> Kind regards, Ton.
> >>
> >>
> >>
> >>
> >> ----- Original Message -----
> >> *From:* Herman <psytek@xxx>
> >> *To:* amsiev <amibroker@xxxxxxxxx ps.com>
> >> *Sent:* Wednesday, June 10, 2009 1:53 PM
> >> *Subject:* Re: [amibroker] Re: Managing many layouts-formulas
> >>
> >> Hi Ton,
> >>
> >>
> >> I don't think that is possible.
> >>
> >>
> >> Didn't get any bright ideas yet on how to solve this problem ...
> >>
> >>
> >> best regards,
> >>
> >> herman
> >>
> >>
> >>
> >> Wednesday, June 10, 2009, 6:19:04 AM, you wrote:
> >>
> >>
> >> > Hi Herman. Welcome to the club. I have the same problem. Perhaps you can
> >> tell
> >>
> >> > me how I can modify the TAB names in AFL or Script ...
> >>
> >>
> >> > Regards, Ton.
> >>
> >>
> >>
> >>
> >> > ------------ --------- --------- ------
> >>
> >>
> >> > **** IMPORTANT PLEASE READ ****
> >>
> >> > This group is for the discussion between users only.
> >>
> >> > This is *NOT* technical support channel.
> >>
> >>
> >> > TO GET TECHNICAL SUPPORT send an e-mail directly to
> >>
> >> > SUPPORT {at} amibroker.com
> >>
> >>
> >> > TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> >>
> >> > http://www.amibroke r.com/feedback/ <http://www.amibroke r.com/feedback/>
> >>
> >> > (submissions sent via other channels won't be considered)
> >>
> >>
> >> > For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> >>
> >> > http://www.amibroke r.com/devlog/ <http://www.amibroke r.com/devlog/>
> >>
> >>
> >> > Yahoo! Groups Links
> >>
> >>
> >> > http://groups. yahoo.com/ group/amibroker/
> >>
> >>
> >> > Individual Email | Traditional
> >>
> >>
> >> > http://groups. yahoo.com/ group/amibroker/ join
> >>
> >> > (Yahoo! ID required)
> >>
> >>
> >> > mailto:amibroker-digest@ yahoogroups. com<amibroker-digest@ yahoogroups. com>
> >>
> >>
> >> > mailto:amibroker-fullfeatu red@xxxxxxxxxxxx com<amibroker-fullfeatu red@xxxxxxxxxxxx com>
> >>
> >>
> >> > amibroker-unsubscri be@xxxxxxxxxxxx com
> >>
> >>
> >> > http://docs. yahoo.com/ info/terms/
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> >
>