PureBytes Links
Trading Reference Links
|
At 03:19 PM 3/22/2007, you wrote:
>What is wrong with the code then? You mentioned it as an example of
>an initialization error and said that Avg hundreds of bars to reach
>near the correct value.
I tested it and found that they fixed the major problem. At one time if you initialized the variable "Avg" to zero:
Var: Avg(0);
Avg = XAverage(Close, 200);
the function would plot the red curve on the attached picture. They now set it to Price on CurrentBar = 1 which is better (blue curve). But it still takes more than a year of daily bars to stabilize.
The correct value is the white curve, started long before this time.
The black curve is much better. It initializes the value to WAverage(Close, 200), which forces the MaxBarsBack setting to 200 and calculates a value that is a lot closer to the correct white curve.
Bob Fulks
Attachment:
Omega.12.png
Description: PNG image
|