[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Metastockusers] Color change for MACDH



PureBytes Links

Trading Reference Links

Hi Arthur

You can create a custom MACD indicator with as many different plots
as required. I can't tell from your question if you have two different
logical conditions or four (or more), so I'll show the code for just two
conditions. Once you have the custom indicator plotting lines on a chart
you should first set the colour of each plot, then change the style of each
plot to histogram. From memory it's easier to set the colour first, but
that's not really important.

Once you have the custom indicator plotting exactly as you wish you
must save the chart as template, preferably as the new default template
so that each new chart then displays the new MACDH. Of course you
would need to delete existing smart charts before the new template
would replace the existing old charts.

Get the custom indicator right on just one chart before you consider 
creating a new default template. Rather than write over the top of the 
default template you might want to make a backup of it first. It's found
in the "Charts" folder.

Here's the code you could start with for a "two colours / two plots"
custom MACDH

{Custom MACDH}
M:=MACD();
Up:=If(M>Ref(M,-1),M,0);
Dn:=If(M>Ref(M,-1),0,M);
Up;
D;

If you have more conditions to consider you can add more variables and
plots and change the decision making logic within each If() function. 


Kind regards

Roy Larsen
www.metastocktips.co.nz
Free formulas and MS links





----- Original Message ----- 
From: "Arthur Lim" <irsan@xxxxxxxxxxxxxx>
To: <Metastockusers@xxxxxxxxxxxxxxx>
Sent: Wednesday, February 02, 2005 2:57 AM
Subject: [Metastockusers] Color change for MACDH


> 
> Hi guys
>  I have MACDH on my chart but I would like the histogram to change from 
> green bar to red bar when it decrease (above zero line) and red bar to 
> green bar when it less negative (below zero line).
> Can someone advise me how to do it..??
> 
> Arthur
> 
> 
> ----------------------------------------------------------
> This email has been scanned for viruses by StarHub e.Scan.
> 
> 
> --------------------------------------------------------------------------------
> Yahoo! Groups Links
> 
>  a.. To visit your group on the web, go to:
>  http://groups.yahoo.com/group/Metastockusers/
>    
>  b.. To unsubscribe from this group, send an email to:
>  Metastockusers-unsubscribe@xxxxxxxxxxxxxxx
>    
>  c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 
> 
>



------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/zMEolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/Metastockusers/

<*> To unsubscribe from this group, send an email to:
    Metastockusers-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/