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

Re: ts4 easy language q



PureBytes Links

Trading Reference Links

At 1:23 PM -0500 4/20/02, Chris Cheatham wrote:

>Ran into a couple of quirks in ts4 easylanguage...the average functions
>
>myfunction is a negative number, but it can be positive too...
>
>first... xaverage(myfunction, 1) is not equal to myfunction.  I assume this
>a single precision issue? Not a huge deal at the moment.
>
>Next... average(xaverage(myfunction, 1), 10) returns a correct number.
>However average(myfunction, 10)  has no correlation to myfunction at all.
>I'm stumped.
>
>Any ideas on problem #2?

You do not state whether or not myfunction is a series or simple
function. or what it returns.

The Average function refers to bars back in time. It looks as if your
function does not provide bars back in time.

    Value1 = myfunction;
    Value2 = average(Value1, 10);

Here we are assigning Value1 a series of values that the Average
function can refer to.

Another example is CurrentBar and BarNumber. They have the same value
but CurrentBar has no history whereas BarNumber does.

Isn't EasyLanguage easy...

Bob Fulks