## Figurelli Series indicator

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

### Figurelli Series indicator

Calculates multiple moving averages trend, looking for divergence, start of reversal and strong trends.
Default configuration: 36 moving averages series trends compared each other. If indicator value is 36 or -36 indicates a strong rise/fall trend.

Code: Select all
`function Init()    indicator:name("Figurelli Series indicator");    indicator:description("Figurelli Series indicator");    indicator:requiredSource(core.Bar);    indicator:type(core.Oscillator);        indicator.parameters:addInteger("series", "series", "series", 36);    indicator.parameters:addInteger("interval", "interval", "interval", 6);    indicator.parameters:addColor("clr", "Color", "Color", core.rgb(0, 0, 255));endlocal first;local source = nil;local series;local interval;local FS=nil;function Prepare()    source = instance.source;    series=instance.parameters.series;    interval=instance.parameters.interval;    first = source:first()+2;    local name = profile:id() .. "(" .. source:name() .. ", " .. instance.parameters.series .. ", " .. instance.parameters.interval .. ")";    instance:name(name);    FS = instance:addStream("FS", core.Bar, name .. ".FS", "FS", instance.parameters.clr, first);    FS:addLevel(0);endfunction Update(period, mode)    if (period>first+interval*series) then     local tot_Ask=0;     local tot_Bid=0;     local sma;     for i=0,series-1,1 do      sma=core.avg(source.close,core.rangeTo(period,interval*(1+i)));      if source.close[period]<sma then       tot_Ask=tot_Ask+1;      end      if source.close[period]>sma then       tot_Bid=tot_Bid+1;      end     end     local tot=tot_Bid-tot_Ask;     FS[period]=tot;    end end`
Attachments
Figurelli_Series.lua
Alexander.Gettinger
FXCodeBase: Confirmed User

Posts: 2518
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

### Re: Figurelli Series indicator

Can we please request the Strategy for this indicator converted to Lua.

Thanks,

sjc

http://www.mql5.com/en/code/1641

Coondawg71

Posts: 325
Joined: Sat Jan 15, 2011 11:45 am

### Re: Figurelli Series indicator

Apprentice
FXCodeBase: Confirmed User

Posts: 15376
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

### Re: Figurelli Series indicator

Indicator was revised and updated.

Apprentice
FXCodeBase: Confirmed User

Posts: 15376
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

### Who is online

Users browsing this forum: Bing [Bot], FrostyTrader, Google [Bot], Yahoo [Bot] and 3 guests