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

Re: PGO Code?



PureBytes Links

Trading Reference Links

At 01:45 AM 12/30/2003, Alex Matulich wrote:

>I remember that.  Mark Johnson had deliberately obfuscated it with
>bizarre formulas like Tangent(.022199645) and sums of Fibonacci
>constants.  After poring through it a while, one discovers that the
>whole thing reduces to one line of code!  Mark confirmed to me that
>I had figured out the puzzle.
>
>PGO = (close - average(close, length)) / xAverage(TrueRange, length);


Your version is actually better than the original. 

The original defined a lot of variables that were not properly initialized so it took a lot of bars before the variables reached their normal values. 

This caused people to get different results because they did not have enough data on the chart.

Bob Fulks