free & uncensored discussion arena for TheRumpledOne

Moderator: moderators

chancee90046
rank: <50 posts
Posts: 23
Joined: Sat Jun 17, 2006 3:52 am
Reputation: 0
Gender:

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);

if value4 crosses above value5 then
else if value4 crosses under value5 then
Alert( "MACD Hist Red" ) ;

{Layne Hermansen 8/28/04}

TheRumpledOne
rank: 10000+ posts
Posts: 13020
Joined: Sun May 14, 2006 9:31 pm
Reputation: 1641
Location: Oregon
Real name: Avery T. Horton, Jr.
Gender:
Contact:
You can use my TRO_SAK indicator. Just set the inputs to the macd function.

I think I may have coded an _SMAA_MACD indicator or 2 that would show the crosses.