Page 1 of 1

MACD line above histogram ?

Posted: Aug 28 2006
by Guest
is there any way to get the MACD line to draw above the histogram ?

I tried to attach a small sample picture, but the forum says I have reached the 5MB limit.

Posted: Aug 29 2006
by Alex Kramer
Create the MACD in the subchart, then click it and drag to the main chart - is this what you wanted to achieve?

Posted: Aug 29 2006
by TJ
here's the attachment.
you see the red line? It is hidden behind the grey coloured histogram.
can I bring the red line forward?

Posted: Aug 29 2006
by Alexey Kramer
Here's what you can do (see attached screenshot for the results):

-Insert the usual MACD indicator
-Then insert a modified MACD indicator without the histogram so the lines are over the histogram bars.

The code for the modified MACD follows, paste it into PLEditor under some recognizable name and complile.


inputs:
FastLength( 12 ),
SlowLength( 26 ),
MACDLength( 9 ) ;

variables:
MACDValue( 0 ),
MACDAvg( 0 );

MACDValue = MACD( Close, FastLength, SlowLength ) ;
MACDAvg = XAverage( MACDValue, MACDLength ) ;

Plot1( MACDValue, "MACD" ) ;
Plot2( MACDAvg, "MACDAvg" ) ;
Plot3( 0, "ZeroLine" ) ;

Posted: Aug 29 2006
by TJ
thanks for the work around.

if I were to re-compile the MACD, won't it be easier if I simply include the histogram as well, but draw it before the other plots?

Posted: Aug 29 2006
by Alexey Kramer
Excellent idea, this worked - even simpler!

Posted: Sep 18 2006
by TJ
Excellent idea, this worked - even simpler!
in your next release, can you re-compile the MACD so that MACDDiff is the plot1 ?

Posted: Sep 19 2006
by Alex Kramer
We've added this to the To Do list, that's a sensible thing, thanks.