PureBytes Links
Trading Reference Links
|
Hi.
I want to draw just horizontal lines for resistance and suport for the
code below. How can I do this? Can you help me with a code?
_SECTION_BEGIN("ATR Trading System");
/*Writed & composed by Tudor Marcelin - Art Invest*/
k=Param("factor",1,0.5,2.5,0.1); /* multiplication factor*/
n=Param("period",10,1,100,1); /*period*/
f=ATR(n);
R[0] = Close[0];
S[0] = C[0];
for( i = n+1; i < BarCount; i++ )
{
R[i]=R[i-1];
S[i]=S[i-1];
if ( C[i-1] >R[i-1] )
{
r[i] = C[i-1]+k*f[i-1];
s[i]= C[i-1]-k*f[i-1];
}
if ( C[i-1] <S[i-1] )
{
r[i] = C[i-1]+k*f[i-1];
s[i]= C[i-1]-k*f[i-1];
}
Plot(R, "Rez:",colorGreen,styleLine);
Plot(S, "Sup:",colorRed,styleLine);
Plot(Close,"Close",colorBlack,styleCandle);
------------------------ Yahoo! Groups Sponsor --------------------~-->
Home is just a click away. Make Yahoo! your home page now.
http://us.click.yahoo.com/DHchtC/3FxNAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
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/
|