Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 8/21/2009(UTC) Posts: 4
|
Need help
I need to draw trend line betwwen "d"and "f " is possible.pls advise for furter setp.
a:=L<Ref(L,-1) AND L<Ref(L,1); b:=Ref(a,-1); d:=ValueWhen(1,a,L); f:=ValueWhen(1,b,L);
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 4/27/2005(UTC) Posts: 31
|
A line requires a starting point and a slope
use cum(1) inside the valuewhen to get the bar number of the points d and f. Then calulate the distance between the points for the run value. Rise / Run is your slope.
finish the formula with the value of the first point plus the slope times the barsince the first point
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users, Subscribers Joined: 8/21/2009(UTC) Posts: 4
|
I AM NOT HAVING MUCH KNOWLEDGE EVEN IN ENGLISH.
I AM HAVING ONLY TRADING EXPERIANCE .
THATS WHY WRITTING IN MINIMUM WORDS.
SO PLS EXPLAIN IN FORMULA STRUCTURE.
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users Joined: 4/27/2005(UTC) Posts: 31
|
I prefer not to right formulas for others because I do not always understand everything they are wanting to do. I'm not desirous to adjust and modify code. However, here is the basic logic to draw a line between the last two points your formula identifies:
a:=L<Ref(L,-1) AND L<Ref(L,1); b:=Ref(a,-1); d:=ValueWhen(1,a,L); f:=ValueWhen(1,b,L); point1:= lastvalue( valuewhen(1, a, Cum(1) ) ); point2:= lastvalue( valuewhen(1, b, Cum(1) ) ); startx:= min( point1, point2); starty:= if(point1<point2, d, f); run:= ABS( point1-point2); rise:= if(point1<point2, f-d, d-f); slope:= rise / run; line:= starty + (barsince( cum(1)=startx ) * slope)
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.