Not sure if I'm allowed to ask for this, but is there anyone who could code this macd histogram indicator into an indicator for radar screen? This is a great indicator that has been providing terrific results. I would love to have an indicator that notifies me when the histogram line crosses the center line (zero line). If there is anyone that can help, I would really appreciate it. Thanks, Chance.
Here is the code:
[LegacyColorValue = true];
inputs: FastLength( 12), SlowLength( 26), MACDLength( 9) ,
PosTrend(darkgreen),NegTrend(darkred), FastMovAvg(1),SlowMovAvg(2);
value1 = MACD( Close, FastLength, SlowLength) ;
value2 = XAverage( value1, MACDLength ) ;
value3 = value1 - value2 ;
value4 = Waverage(value3, FastMovAvg);
Value5 = Waverage(value3, SlowMovAvg );
Plot1( value3, "Histogram" ) ;
Plot2 (0, "Zero Line");
Plot3 ( value4, "FasMovAvg");
Plot4 ( value5, "SlowMovAvg");
If value4>Value5 then
SetPlotColor(1,PosTrend)
else setplotcolor(1,NegTrend);
If value4>Value5 and value4[1]<value5[1]
then setplotColor(1,green);
If value4<Value5 and value4[1]>value5[1]
then setplotColor(1,red);
{ Alert criteria }
if value4 crosses above value5 then
Alert( "MACD Hist Green" )
else if value4 crosses under value5 then
Alert( "MACD Hist Red" ) ;
{Layne Hermansen 8/28/04}
macd histogram for radar screen
Moderator: moderators
-
- rank: <50 posts
- Posts: 23
- Joined: Sat Jun 17, 2006 3:52 am
- Reputation: 0
- Gender:
Please add www.kreslik.com to your ad blocker white list.
Thank you for your support.
Thank you for your support.
- TheRumpledOne
- rank: 10000+ posts
- Posts: 15558
- Joined: Sun May 14, 2006 9:31 pm
- Reputation: 3035
- Location: Oregon
- Real name: Avery T. Horton, Jr.
- Gender:
- Contact: