PureBytes Links
Trading Reference Links
|
MACD can be calculated in a variety of ways. The below formulae use Omega's version of the MACD histogram...
Set up the following as inputs (you may change the default values to whatever suits you):
Price(C)
Strength(2)
Occur(1)
FastMA(12)
SlowMA(26)
MACDMA(9)
If CheckAlert and
SwingHigh(Occur, MACD(Close, FastMA, SlowMA) -
XAverage(MACD(Close, FastMA, SlowMA), MacdMA),
Strength, Strength + 1) <> -1 then
{Do Whatever - Paint the bar, issue a sell signal, etc.}
Replace "SwingHigh" with "SwingLow" for bottoms.
---- you wrote:
> I want to code an indicator (or study) in SC4 that will give an alert
> when MACD Histogram ticks up from a bottom or down from a top. I'd like
> to select the number of histogram bars to be considered, as in the
> SwingHigh/SwingLow function 'strength,' so I don't trigger an alert on
> every little wiggle.
> Can anyone point me in the right direction to apply the SwingHigh/Low
> functions to the MACD Histogram? It's not clear to me how to do it,
> I don't know how to reference the Histogram component of MACD-Histogram.
>
> Thanks,
> Monte
>
|