MACD line above histogram ?  [SOLVED]

Questions about MultiCharts and user contributed studies.
Guest

MACD line above histogram ?  [SOLVED]

Postby Guest » 28 Aug 2006

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.

User avatar
Alex Kramer
Posts: 834
Joined: 23 Feb 2006

Postby Alex Kramer » 29 Aug 2006

Create the MACD in the subchart, then click it and drag to the main chart - is this what you wanted to achieve?
Attachments
macd.png
(27.28 KiB) Downloaded 1309 times

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Postby TJ » 29 Aug 2006

here's the attachment.
you see the red line? It is hidden behind the grey coloured histogram.
can I bring the red line forward?
Attachments
macd.jpg
(31.88 KiB) Downloaded 1317 times

User avatar
Alexey Kramer
Posts: 81
Joined: 19 Jul 2005

Postby Alexey Kramer » 29 Aug 2006

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" ) ;
Attachments
macd2.png
(31.77 KiB) Downloaded 1313 times

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Postby TJ » 29 Aug 2006

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?

User avatar
Alexey Kramer
Posts: 81
Joined: 19 Jul 2005

Postby Alexey Kramer » 29 Aug 2006

Excellent idea, this worked - even simpler!

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Postby TJ » 18 Sep 2006

Excellent idea, this worked - even simpler!
in your next release, can you re-compile the MACD so that MACDDiff is the plot1 ?

User avatar
Alex Kramer
Posts: 834
Joined: 23 Feb 2006

Postby Alex Kramer » 19 Sep 2006

We've added this to the To Do list, that's a sensible thing, thanks.


Return to “MultiCharts”