[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Does anybody have AFL code for "Moving Slope" ?



PureBytes Links

Trading Reference Links

That's what seems to be. I tried both ways and Linregslope seems to look better.

//-----------------------------------------------------------------
Periods = Param("Periods", 15, 2, 200, 1, 10 );

//SLP = Param("Slope Periods", 15, 2, 200, 1, 10 );

MAP = Param("MA Periods", 15, 1, 200, 1, 10 );

//x = LinearReg( P, Periods );

x = LinRegSlope( P, Periods );

//y = Ref(x, SLP);

//z = (x-y)/SLP;

//z1 = MA(z,MAP);

z1 = 100*MA(x,MAP);

Plot( z1, _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); 

_SECTION_END();

_SECTION_BEGIN("MA1");

P = ParamField("Price field",-1);

Periods = Param("Periods", 15, 2, 200, 1, 10 );

Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") ); 

_SECTION_END();





------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a href="http://us.ard.yahoo.com/SIG=12hnn4tjh/M=362131.6882500.7825259.1493532/D=groups/S=1705632198:TM/Y=YAHOO/EXP=1124466241/A=2889190/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Put more honey in your pocket. (money matters made easy) Welcome to the Sweet Life - brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~-> 

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 other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 
--- Begin Message --- The latest TASC has a nice article on using moving slope as an
indicator.  I have some ideas on 'playing' around with mov slope...but
am having some trouble with understanding the idea/AFL code.  Is it
simply -  a linear regression slope i.e., LinRegSlope (Close, 22) for
e.g or is it

MovSlope = (EMA (LinRegSlope(C, 22), 13)

where you are taking linear regression slope of close of 22 days and
then an EMA of 13 days




--- End Message ---