[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Color on Histogram solution



PureBytes Links

Trading Reference Links

Pierre, thanks for your help. This seems to work really well, we will have
to await Monday's open to see if it will truly show rising/falling bar
relationships. I added the FastMA and SlowMA lines back into the code.

I'm very curious about optimizing code for speed. I have searched the EL
manual and Putt's books, but can find no reference. Could you please
explain the basic concepts?

>>Here is the  TS code:

inputs: FastMA(12),SlowMA(26),MacdMA(9);

value1=MACD(Close,FastMA,SlowMA)-(XAverage(MACD(Close,FastMA,SlowMA),MacdMA));

plot1(0,"MA up"); {green hist}{this is really nice, thanks for the insight}
plot2(0,"MA dn"); {red hist}

if value1>value1[1] then begin
	plot1(value1,"MA up");
	end else begin
	plot2(value1,"MA dn");

Plot3(MACD(Close,FastMA,SlowMA),"MACD");                       {green line}
Plot4(XAverage(MACD(Close,FastMA,SlowMA),MacdMA),"MACDAvg");    {red line}

end;