Разместил:   Дата: 2005-12-27 16:37
Комментарии: (0)   Рейтинг:

Color on MACD Histogram II

Re: Color o­n Histogram

· To: ribau@xxxxxxxxxxxxx, Omega List
· Subject: Re: Color o­n Histogram
· From: Dennis Holverstott
· Date: Wed, 04 Nov 1998 14:56:35 -0800
· References: <19981104193003196.AAA140@xxxxxxxxxxxxxxxxxxx@notebook>
· Resent-Date: Wed, 4 Nov 1998 14:56:59 -0800
· Resent-From: omega-list@xxxxxxxxxx
· Resent-Message-ID: <"Eaj5h3.0.sG6.xkDGs";@mx1>
· Resent-Sender: omega-list-request@xxxxxxxxxx

> What I was trying to
> code was an indicator that would paint the MACD hist bar green if it has
> risen in relation to the previous bar (increased value), and paint the MACD
> hist bar red if it is lower than the previous bar (decreased value),
> regardless of whether the bar is above or below the zero line.

This could be coded to run much faster but it should do what you want.

Type : Indicator, Name : Color o­n MACD Histogram II


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

if value1 > value1[1] then plot1(value1,"MACD Up") else   {green hist}
if value1 < value1[1] then plot2(value1,"MACD Down") else  {red hist}
plot3(value1,"MACD Flat");                                 {yellow hist}

plot4(value2, "MACD Avg");                                 {line}

Пока комментариев нет

Rambler's Top100

Страница создана за 0.033 секунды