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

Re: ELA Question: Entry as soon as MA xover vs at the close



PureBytes Links

Trading Reference Links

> Hopefully, you'll find my math below not too bad?

Well, I'm OK on the first part.  But here you lost me:

> FactorZ*((C*(FactorX-FactorY) + (1-FactorX)*xavgX[1] -
> (1-FactorY)*xavgY[1])) + (1-FactorZ)*macdZ[1]
> = P*(FactorX-FactorY) + (1-FactorX)*xavgX - (1-FactorY)*xavgY

It looks as though you're saying the smoothed MACD (the part before 
the =) is equal to the unsmoothed MACD with C replaced by P !?

I'd approach it like so, and again, I am whipping this off the top of 
my head so if you want to use it, it's your job to check it!!  :-)

the smoothed MACD is 
> FactorZ*((C*(FactorX-FactorY) + (1-FactorX)*xavgX[1] -
> (1-FactorY)*xavgY[1])) + (1-FactorZ)*macdZ[1] + (1-FactorY)*xavgY -
> (1-FactorX)*xavgX

... as you said.  (You have an extra set of ()'s but that doesn't 
hurt anything.)  You want to solve for the value of C that causes it 
to equal zero on the next bar.  So:   (using FX, FY, FZ instead of 
FactorX/Y/Z)

0 = FZ*C*(FX-FY) + FZ*(1-FX)*xavgX - FZ*(1-FY)*xavgY + (1-FZ)*macdZ

FZ*C*(FX-FY) = -FZ(1-FX)*avgX + FZ*(1-FY)*avgY - (1-FZ)*macdZ

C = -FZ(1-FX)*avgX + FZ*(1-FY)*avgY - (1-FZ)*macdZ
    -----------------------------------------------
                     FZ*(FX-FY)

which could be simplified as

C = -(1-FX)*avgX + (1-FY)*avgY - (1-FZ)*macdZ/FZ
    --------------------------------------------
                       FX-FY

Gary