Thursday, May 26, 2011

AMA adaptive sliding average

Hello dear readers! More a reader asked me to copy with or Omegi Metadrain AMA adaptive sliding average) Kaufmana. The release today will write it on the indicator.
19.1 Algorithm

Detailed description of the indicator and the algorithm of its work is to be said Konstantin Kopyrkinym, the clause "Dynamic sliding average.? Anou2", journal Modern trading. Clause in PDF format (475 KB), can address skachat

BUT it Kaufmana eksponentsialno smoothed sliding average, only the factor of average not constant, and varies depending on market conditions. The average flete factor increases, the AMA was fun and not give false signals, the trend is decreasing and AMA is fast, without delay (relative) responds to the change in price.

For those not skachal clause, I will briefly describe the algorithm. The indicator has time, will be defined by the amount of bars participating in the calculation of indicators. During this period it is defined, etc. "Efficiency of movement. "Efficiency of movement" are payments position of the movement trajectory of the price for that period. The maximum value of this factor 1, minimal 0th For example, all between 10 and last 10 svechej "bull" in this case "efficiency movement" will be equal to the first A trajectory that is considered the cost of incarceration. The indicator is based on two periods average (EMA), large and small. The limits period BUT will vary depending on the "efficiency of movement. That minimum period of 1 and maximum value for the 0th

The external variables that will carry the AMA period, the border periods (major and minor EMA) and the amount of bars that will be displayed on the indicator.
Indicator 19.2


/ * [[
Name: = AMA
Author: = forextimes
Link: = fxtest.ru
Notes: AMA = Kaufman
Separate Window: = No
First Color: Blue =
First Draw Type: = Line
First Symbol: = 217
Use Second Data: = No
Second Color: Red =
Second Draw Type: = Line
Second Symbol: = 218
]] * /
inputs: n (10), fastMA (2), slowMA (30), Nbars (500);
Variable: shift (0), K (0), noise (0), signal
(0) I (0), AMA (0), ssc (0), ER (0), AMA1 (0);

SetLoopCount (0);
/ / Loop from the first bar of the current bar (with shift = 0)
AMA1 = c [Nbars] / * January isskustvennoe first value of the indicator, we equate you with the closing price * /

For shift = Nbars Downto 0
Start / early indicator rasscheta znachacheny

signal = 0 / / move
Noise = 0 / / a trajectory
signal = abs (c [change]-c [shift + n-1]) / / we calculate the range

for i = shift the Shift + n-1
Start
Noise Noise => abs (c [i]-c [i +1]); / / we calculate the trajectory
end;

er = signal / noise / /
ssc = er * (2 / (1 + fastMA) -2 / (1 + slowMA)) + (2 / (1 + slowMA));
/ / Changes constantly leveling

/ / Value AMA
AMA = (c [change] * ssc * SSC) + GetIndexValue (Shift +1) * (1-SSC * SSC);
/ / Zngachenie AMA for the first bar
if shift = Nbars then AMA = (c [change] * ssc * SSC) + AMA1 * (1-SSC * SSC);
/ / BUT I bring value to a file indicator
SetIndexValue (shift, AMA);
End;
19.3 Conclusion

Different people talk about the usefulness of this indicator miscellaneous, but his idea so simple and logical, that it is a technical tool causes me great sympathy. I am convinced that there will be the sole indicator that this is necessary as desirable.

No comments:

Post a Comment

Powered by Blogger.