PureBytes Links
Trading Reference Links
|
At 6:38 PM -0500 11/1/99, Ian MacAuslan wrote:
>I'm refining a 5-minute bar Exponential Moving Avg-based system, and am
>trying to write a simple method to "adjust out" the effect of gap
>opennings -- since these can wildly distort the calculation of the "true
>signal" the moving average is attempting to capture. (The distortion is
>most noticeable in the first hour or so.)
>
>I'm having a real EasyLanguage problem. Could someone tell me how I can
>get around this? It's telling me I can't use a variable in the
>calculation of TradeStation's XAVERAGE function.
Attached is a revised version of the "XAverage" function called
"XAverage.V" that will accept variables as the price series input.
It is a "simple" function so must be called on every bar to get the
same values as the XAverage function. This means you should not use
it inside some conditional statement.
INCORRECT usage:
if <condition> then begin
Value3 = XAverage.V(Value2, 30); {Only called on some bars}
end
CORRECT usage:
Value1 = XAverage.V(Value2, 30); {Called on every bar}
if <condition> then begin
Value3 = Value1;
end
(The input "Length" should be a fixed value (constant or variable)
that does not change from bar to bar since it is only used in the
function on CurrentBar = 1.)
Bob Fulks
Attachment Converted: "c:\eudora\attach\XAVEV.ELA"
|