GT::Indicators::FRAMA - FRactal Adaprive Moving Average
An exponential moving average gives more importance to recent prices ... similarly a Frama uses a variable (adaptive) alpha
The first argument is the period used to calculed the average.
The second argument is optional. It can be used to specify an other stream of input data for the average instead of the close prices. This is usually an indicator (detailed via {I:MyIndic <param>}).
In TA, the first value is often constructed as SMA(N).
Note: One criticism could be that the EMA is calculated starting from the designated period. But actually the EMA goes all the way back to the beginning of the available data. But in all tools I checked they start computation from the loaded data on.
GT::Indicators::FRAMA->new() GT::Indicators::FRAMA->new([20])
If you need a 30 days FRAMA of the opening prices you can write one of those lines :
GT::Indicators::FRAMA->new([30, "{I:Prices OPEN}"])
A 10 days EMA of the RSI could be created with :
GT::Indicators::FRAMA->new([10, "{I:RSI}"])
note!!! The number of days has to be EVEN!!