PureBytes Links
Trading Reference Links
|
Added Paramaters to D, as below, to change the point of origin while
viewing.
Larry
D=Param("Days",50,3,300,1);
ANGLEdeg=Param("a",45,-89,89,1);
x=Cum(1);L1=LastValue(x);
y=RSI();
x0=x[L1-D];
Y0=Y[L1-D];
pi=4*atan(1);ANGLErad=pi*ANGLEdeg/180;
z=y0+(sin(ANGLErad)/cos(ANGLErad))*(x-x0);
Plot(y,"",1,1);
Plot(IIf(x>=x0,z,-1e10),"",colorRed,1);
Plot(IIf(x>=x0,y0,-1e10),"",colorRed,1);
PlotShapes(shapeUpTriangle*(x==x0),colorYellow);
Title="ANGLEdeg="+WriteVal(ANGLEdeg,1.0);
--- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx>
wrote:
> Anthony,
> For any point , D bars before the end of an array y, we may draw an
> automatic line with ANGLEdeg [in degrees, positive or negative.
> Avoid +-90, the tan is not defined there.
> Since we do not have in AFL a tangent function [as we miss pi], we
> should use their equivalents
>
> D=50;ANGLEdeg=Param("a",45,-89,89,1);
> x=Cum(1);L1=LastValue(x);
> y=RSI();
> x0=x[L1-D];
> Y0=Y[L1-D];
> pi=4*atan(1);ANGLErad=pi*ANGLEdeg/180;
> z=y0+(sin(ANGLErad)/cos(ANGLErad))*(x-x0);
> Plot(y,"",1,1);
> Plot(IIf(x>=x0,z,-1e10),"",colorRed,1);
> Plot(IIf(x>=x0,y0,-1e10),"",colorRed,1);
> PlotShapes(shapeUpTriangle*(x==x0),colorYellow);
> Title="ANGLEdeg="+WriteVal(ANGLEdeg,1.0);
>
> Dimitris Tsokakis
>
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/
|