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.
MACD line above histogram ? [SOLVED]
- Alex Kramer
- Posts: 834
- Joined: Feb 23 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
- TJ
- Posts: 7765
- Joined: Aug 29 2006
- Location: Global Citizen
- Has thanked: 1036 times
- Been thanked: 2232 times
here's the attachment.
you see the red line? It is hidden behind the grey coloured histogram.
can I bring the red line forward?
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
- Alexey Kramer
- Posts: 81
- Joined: Jul 19 2005
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" ) ;
-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
- TJ
- Posts: 7765
- Joined: Aug 29 2006
- Location: Global Citizen
- Has thanked: 1036 times
- Been thanked: 2232 times
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?
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?
- TJ
- Posts: 7765
- Joined: Aug 29 2006
- Location: Global Citizen
- Has thanked: 1036 times
- Been thanked: 2232 times
in your next release, can you re-compile the MACD so that MACDDiff is the plot1 ?Excellent idea, this worked - even simpler!
- Alex Kramer
- Posts: 834
- Joined: Feb 23 2006
We've added this to the To Do list, that's a sensible thing, thanks.