PureBytes Links
Trading Reference Links
|
At 08:21 AM 6/21/2004, Gary Fritz wrote:
>OK, here's one that I run into occasionally and has always driven
>me nuts. Anybody have an explanation/fix?
>
>I often use indicators that take an expression as their input,
>like Custom 1 Line. Sometimes I use this with two data series.
>So let's say I'm using Custom 1 Line to display the difference
>between two data series, passing "C - C data2" to the indicator.
>Works fine. Now I want to look at a recent average of that
>difference. As soon as I wrap "C - C data2" with average,
>xaverage, t3average, anything like that -- the indicator returns
>zero.
>
>I can wrap "C - C data2" with other functions, like sine or
>absvalue or whatever, and it works fine. But any average
>function flatlines it.
>
>What's going on here??
>Gary
Can't offer any explanation, but maybe C of data1 - C of data2 might work.
Also with averages, since Average( x + y ) = Average(x) + Average(y) then instead of
Average(C - C data2, 5) you can use either of
Average(C, 5) - Average(C of data2, 5)
or possibly better,
Average(C, 5) - Average(C, 5) of data2
Maybe you can rework your indicator to accommodate this.
I have notes written to myself that "Average(C, 5) of data2" is the better way to do it because it avoids a very obscure bug I met a long time ago that may be fixed by now.
HTH,
Mike Gossland
|