Hi,
I got the AverageFC-indicator from Omega Research:
Its a little bit differently to the standard Average and sometimes a little bit other values, but I need the accurately AverageFC function for 2 indicators.
My question, how can I realize the AverageFC function in eSignal? I have problems with the Currentbar, if I use BARSTATE_CURRENTBAR, I get no values. Is this the initialization for the Average? But, why the line:
I would be very lucky, if someone could help me.
I got the AverageFC-indicator from Omega Research:
PHP Code:
{*******************************************************************
Description: Simple Moving Average (fast calculation)
Provided By: Omega Research, Inc. (c) Copyright 1999
********************************************************************}
Inputs: Price(NumericSeries), Length(NumericSimple);
Variables: Sum(0), Counter(0);
If CurrentBar = 1 Then Begin
Sum = 0;
For counter = 0 To Length - 1 Begin
Sum = Sum + Price[counter];
End;
End
Else
Sum = Sum + Price - Price[Length];
If Length > 0 Then
AverageFC = Sum / Length
Else
AverageFC = 0;
{Force Series Function}
If False Then
value1 = AverageFC[1];
PHP Code:
{*******************************************************************
Description: Simple Moving Average
Provided By: Omega Research, Inc. (c) Copyright 1999
********************************************************************}
Inputs: Price(NumericSeries), Length(NumericSimple);
Variables: Sum(0), Counter(0);
Sum = 0;
For counter = 0 To Length - 1 Begin
Sum = Sum + Price[counter];
End;
If Length > 0 Then
Average = Sum / Length
Else
Average = 0;
My question, how can I realize the AverageFC function in eSignal? I have problems with the Currentbar, if I use BARSTATE_CURRENTBAR, I get no values. Is this the initialization for the Average? But, why the line:
PHP Code:
Sum = Sum + Price - Price[Length];
Comment