Hi AB Community.

I just wanna ask is there ALMA indicator in Amibroker by default?

Or can it be coded using AFL?

Thanks!

Hi AB Community.

I just wanna ask is there ALMA indicator in Amibroker by default?

Or can it be coded using AFL?

Thanks!

1 Like

Yes it is included by default. See Charts windows, "Averages" folder.

Sorry, I use AB 6.29 but I do not have ALMA. Tried to install 6.30 but is the same. Please could you advise me on ALMA indicator ?

Thanks and regards

@ii_ldm, It is not in Averages folder but in manual.

```
/// Another example: ALMA which is FIR Filter with
/// shifted Gaussian coefficents can be implemented as follows:
/// @ link https://www.amibroker.com/guide/afl/fir.html
function ALMA_AFL( input, range, Offset, sigma )
{
local m, im, s, Coeff;
m = floor( Offset * (range - 1) );
s = range / sigma;
for( i = 0; i < Min( range, BarCount ); i++ )
{
im = i - m;
Coeff[ i ] = exp( - ( im * im )/ ( 2 * s * s ) );
}
return FIR( input, Coeff, range );
}
```

3 Likes

Apparently I did not put it in the setup (yet) but it is here:

```
// ALMA (Arnaud Legoux Moving Average)
// ALMA is shifted Gaussian distribution FIR filter,
// more info: http://www.arnaudlegoux.com
// http://en.wikipedia.org/wiki/Arnaud_Legoux_Moving_Average
//
// default:
// sigma = 6
// offset = 0.5 (symmetric distribution), 0.85 (asymetric distribution)
//
// AFL code (C)2011 AmiBroker.com
function ALMA_AFL( input, range, offset, sigma )
{
local m, im, s, Coeff;
m = floor( Offset * (range - 1) );
s = range / sigma;
for( i = 0; i < Min( range, BarCount ); i++ )
{
im = i - m; // apply shift
Coeff[ i ] = exp( - ( im * im )/ ( 2 * s * s ) ); // Gaussian distribution
}
return FIR( input, Coeff, range );
}
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Offset = Param("Offset", 0.85, 0, 1, 0.01 );
sigma = Param("Sigma", 6, 1, 10, 0.1 );
Plot( ALMA_AFL( P, Periods, Offset, Sigma ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
```

Note that this one is a complete working indicator formula with drag-drop capability.

2 Likes

please how to make exploration with this code

please help me at this urgent matter

thanks

```
// ALMA (Arnaud Legoux Moving Average)
// ALMA is shifted Gaussian distribution FIR filter,
// more info: http://www.arnaudlegoux.com
// http://en.wikipedia.org/wiki/Arnaud_Legoux_Moving_Average
//
// default:
// sigma = 6
// offset = 0.5 (symmetric distribution), 0.85 (asymetric distribution)
//
// AFL code (C)2011 AmiBroker.com
function ALMA_AFL( input, range, offset, sigma )
{
local m, im, s, Coeff;
m = floor( Offset * (range - 1) );
s = range / sigma;
for( i = 0; i < Min( range, BarCount ); i++ )
{
im = i - m; // apply shift
Coeff[ i ] = exp( - ( im * im )/ ( 2 * s * s ) ); // Gaussian distribution
}
return FIR( input, Coeff, range );
}
P = ParamField("Price field",-1);
Periods = Param("Periods", 15, 2, 300, 1, 10 );
Offset = Param("Offset", 0.85, 0, 1, 0.01 );
sigma = Param("Sigma", 6, 1, 10, 0.1 );
Plot( ALMA_AFL( P, Periods, Offset, Sigma ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
```

I tried to make exploration using this code several times with period 200 days, but every time I got some errors and I am basic in coding, so If anyone can help me exploring will be appreciated

Then did you search the forum for 'Exploration'?

Please have a read of the AmiBroker documentation on How to create your own exploration.

Once you've attempted to create your own exploration, pls use the suggestions in How to ask a good question to explain what you want to achieve, what you attempted, and what the problem is that's preventing you from achieving it.

Many of the members on this forum were "basic in coding" to begin with, but perseverance pays off.

I already suggested this but I don't think @fakhreddin is too interested in learning correct forum rules or attempting to help himself so...

@Tomasz, when you'll put in the setup you can remove the above lines. It seems that the site is no longer active and the Wikipedia article was deleted.

4 Likes

Correct implementation of ALMA is given in post #7 Arnaud Legoux Moving Average - #7

Thread is closed because nonsense was posted after 5 years in subsequent posts and this forum is no-nonsense place.

Also ALMA seems to be somewhat failed attempt by Mr Arnaud to become famous. Their web page disappeared original author apparently lost interest after no-body really cared about that "invention".

There is nothing original or interesting about ALMA as it is just low pass FIR filter. Nothing new under the sun.