Buttoned version viewtopic.php?p=1295481416#p1295481416太虚一毫 wrote: Mon Jun 27, 2022 1:04 pm very funny!
Expect the teacher to add a button for long-term testing. Infinite merit!
Re: Moving Average indicators for MT4
2271- Rating: 0.6%
Buttoned version viewtopic.php?p=1295481416#p1295481416太虚一毫 wrote: Mon Jun 27, 2022 1:04 pm very funny!
Expect the teacher to add a button for long-term testing. Infinite merit!
Code: Select all
// FractalAMA
//
// Description: Fractal Adaptive Moving Average - by John Ehlers
// Version 1.1 7/17/2006
//
// Heavily modified and reprogrammed by Matt Kennel (mbkennelfx@gmail.com)
//
// Notes:
// October 2005 Issue - "FRAMA - Fractal Adaptive Moving Average"
// Length will be forced to be an even number. Odd numbers will be bumped up to the
// next even number.
// Formula Parameters: Defaults:
// RPeriod 16
#property copyright "Copyright © 2005, MrPip " // and mbkennel
#property link "http://www.metaquotes.net/"
"What is an LSMA?
It stands for Least Squares Moving Average and the indicator plots the endpoint of the linear regression line.
By comparing the current value to the prior value a determination is made of a possible trend,
ie the linear regression line is pointing up or down.
Use the close of the current candle after it is finished and the next candle is forming as the end point.
That avoids the problem of a candle changing the value of the indicator in real time."
( by ForexTsd 11.06.2005 )
Code: Select all
enum maTypes
{
ma_sma, // Simple Moving Average - SMA
ma_ema, // Exponential Moving Average - EMA
ma_smma, // Smoothed Moving Average - SMMA
ma_lwma, // Linear Weighted Moving Average - LWMA
ma_dsema, // double smoothed exponential moving average - DSEMA
ma_dema, // double exponential moving average - DEMA
ma_tema, // tripple exponential moving average - TEMA
ma_pwma, // parabolic weighted moving average - PWMA
ma_alxma, // Alexander moving average - ALXMA
ma_vwma, // volume weighted moving average - VWMA
ma_hull, // Hull moving average - HMA
ma_tma, // triangular moving average
ma_sine, // sine weighted moving average
ma_linr, // linear regression value - LSMA
ma_ie2, // IE/2
ma_nlma, // non lag moving average
ma_zlma, // zero lag moving average
ma_lead, // leader exponential moving average
ma_ssm, // super smoother
ma_smoo // smoother
};
Code: Select all
enum ENUM_MA_MODE
{
ALMA, // Arnaud Legoux Moving Average
IE_2, // Combination of LSMA and ILRS
EMA, // Exponential Moving Average
DEMA, // Double Exponential Moving Average by P.Mulloy
TEMA, // Triple Exponential Moving Average by P.Mulloy
DsEMA, // Double Smoothed EMA
TsEMA, // Triple Smoothed EMA
EWMA, // Exponential Weighted Moving Average
GeoMean, // Geometric Mean
HMA, // Hull Moving Average by A.Hull
ITrend, // Instantaneous Trendline by J.Ehlers
ILRS, // Integral of Linear Regression Slope
Laguerre, // Laguerre filter by J.Ehlers
LWMA, // Linear Weighted Moving Average
LSMA, // Least Square Moving Average (or EPMA, Linear Regression Line)
JSmooth, // M.Jurik's Smoothing
MD, // McGinley Dynamic
Median, // Moving Median
REMA, // Regularized EMA by C.Satchwell
Decycler, // Simple Decycler by J.Ehlers
SMA_eq, // Simplified SMA
SMA, // Simple Moving Average
SineWMA, // Sine Weighted Moving Average
SMMA, // Smoothed Moving Average
SuperSmu, // SuperSmoother by J.Ehlers
T3_basic, // T3 by T.Tillson (original version)
T3, // T3 by T.Tillson (correct version)
BF3P, // Three-pole modified Butterworth filter by J.Ehlers
BF2P, // Two-pole modified Butterworth filter by J.Ehlers
TriMA, // Triangular Moving Average
TriMAgen, // Triangular Moving Average generalized by J.Ehlers
VWMA, // Volume Weighted Moving Average
VEMA, // Volume-weighted Exponential Moving Average(V-EMA)
eVWMA, // Modified eVWMA
Wilder, // Wilder Exponential Moving Average
ZeroLagEMA, // Zero-Lag Exponential Moving Average
};