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

Re: EL code - Normalizing data



PureBytes Links

Trading Reference Links

It is not at all clear to me what you are looking for. Normalize how?

There are lots of "oscillators" provided with TradeStation that "normalize
data" in various ways so that the result is within a fixed range.

RSI is one, for example. It normalizes to between 0 and 100. If you wanted
to shift this to be within -1 to +1 you could do so as follows:

    Value1 = (RSI(Close, 14) - 50) / 50;

Bob Fulks


>Sheesh, all I wanted to do is create an indicator which
>would plot data on a scale of -1 through +1 (otherwise known
>as normalizing the data). This can certainly be accomplished
>mathematically but I don't know how to translate it to EL
>code.
>
>Consequently, I made an "EasyLanguage Help Request" on the
>Omega website. I thought it would be a rather simple matter
>to write the code. I merely asked if they had the code or,
>alternatively, how I would go about writing it. The
>following is the response I received:
>
>>>Dear Mr. Mazzulla,
>>>TradeStation goes through the entire code for every bar so
>>>before it gets to the last bar how will it know the highest or lowest
>>>value for
>>>the whole data field?
>
>I'm sure someone will correct me if I'm in error but didn't
>they answer my question with a question? Further, I'm not
>even sure the answer or, more appropriately, question makes
>sense.
>
>Is coding this in EL such a big deal. I'd sure appreciate
>some feedback from members of the LIST concerning this
>matter. TIA
>
>Best regards,
>Jim


--
Bob Fulks
bfulks@xxxxxxxxxxxx