Lol I just read the description again...

Quote:
Description

This is the standard MACD indicator drawing two flat lines instead of a signal line. It allows you to detect and trade flat/range-bound markets. It is nothing fancy and was only created to run some test, but it might be useful to you.


By the sounds of this its just MACD with these flat lines drawn Ive reattached code to show the difference please note Ive just got all the bars red on normal MACD not sure how you change them with the built in indicator to show blue for accelerating.

Quote:

function run(){
set(PLOTPRICE+PLOTNOW);
BarPeriod = 15;
LookBack = 500;
StartDate = 20120201;
NumDays = 1;

int FastEMA = 9;
int SlowEMA = 26;
int AvPeriod = 400;
var Gamma = 0.75;

vars med = series(MedPrice());

vars median = series(MACD(med,FastEMA,SlowEMA,4));
vars MACDHistory = series(rMACDHist);
vars FextMapBuffer6 = series(median[0] - median[1]);
vars FextMapBuffer5 = series(abs(FextMapBuffer6[0]));
vars FextMapBuffer1 = series(0);
vars FextMapBuffer2 = series(0);

var flat = EMA(FextMapBuffer5,AvPeriod);
vars FextMapBuffer3 = series((flat * Gamma));
vars FextMapBuffer4 = series(0 - (flat * Gamma));

int NewWindow2 = 0;
plot("NewWindow2",NewWindow2,NEW,BLACK);
plot("MACD",MACDHistory[0],BARS,RED);
plot("FextMapBuffer3",FextMapBuffer3[0],0,BLACK);
plot("FextMapBuffer4",FextMapBuffer4[0],0,BLACK);

int NewWindow = 0;
plot("NewWindow",NewWindow,NEW,BLACK);
if(FextMapBuffer6[0] < FextMapBuffer6[1]) {
FextMapBuffer2[0] = FextMapBuffer6[0];
FextMapBuffer1[0] = 0;
plot("FextMapBuffer2",FextMapBuffer2[0],BARS,RED);
}
else if(FextMapBuffer6[0] > FextMapBuffer6[1]) {
FextMapBuffer1[0] = FextMapBuffer6[0];
FextMapBuffer2[0] = 0;
plot("FextMapBuffer1",FextMapBuffer1[0],BARS,BLUE);
}
plot("FextMapBuffer3",FextMapBuffer3[0],0,BLACK);
plot("FextMapBuffer4",FextMapBuffer4[0],0,BLACK);
}