_SECTION_BEGIN ("MA
Detrend 28"); SetBarsRequired(100000,0); period1 = Param("Period1",6,1,10,1); period2 = Param("Period2",9,1,100,1); period3 = Param("Period3",28,1,300,1); M0 = MA(C,period1 ); M1 = MA(C,period2 ); M2 =
MA(C,period3
); Detrend28 = M0 - M1; Detrend50 = M1 - M2; Detrended = M0 +
(Detrend28 + Detrend50)/3; M02 = MA(H,period1 ); M10 = MA(H,period2 ); M20 = MA(H,period3 ); Detrend28a =
M02 - M10; Detrend50a = M10 - M20; Detrendeda = M02 +
(Detrend28a + Detrend50a)/3; M03 = MA(L,period1 ); M13 = MA(L,period2 ); M23 = MA(L,period3 ); Detrend28b =
M03 - M13; Detrend50b = M13 - M23; Detrendedb = M03 + (Detrend28b +
Detrend50b)/3; Plot(Close,"Close",1,128); //Plot(Detrend28 ,"Detrend28 ",7,1); //Plot(Detrend50 ,"Detrend50
",6,1); Plot(Detrendeda
,"High ",6,1); Plot(Detrended ,"Close ",2,1); Plot(Detrendedb ,"Low ",4,1); Plot(EMA(C,34),"",14,1); _SECTION_END();
Mr.
Valley
Anybody can help?
Thanks,
Louis
--- In amibroker@xxxxxxxxxps.com,
"Louis Préfontaine" <rockprog80@...> wrote: > > I am
trying to build a formula to "detrend" the market. > > What I
want to set is something like this > > Close of day 0 * ( log
(open day2/open day 1) - average log return of > every day of the
data available. > > Anybody can do that? > >
Thanks, > > Louis >
__._,_.___
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
__,_._,___
|