logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
homano  
#1 Posted : Thursday, August 28, 2014 8:16:26 AM(UTC)
homano

Rank: Member

Groups: Registered Users, Subscribers
Joined: 8/19/2014(UTC)
Posts: 23

Thanks: 4 times

This is an indicator , "Trend-Line"

pv:= Input("VeryLong=4,Long=3,Med=2,Short=1",1,4,3);
pp:= LastValue(If(pv=4,4,If(pv=3,2,If(pv=2,1,0.5))));
r0:= If(MP()>=Ref(MP(),-1),ATR(1),0);
r1:= Log(If(r0>0,ATR(1),HIGH)/HIGH);
r2:= Cum(r1)/Max(1,Cum(If(r0>0,1,0)));
r3:= LastValue(100*Exp(LastValue(r2)))*pp;
r4:= LastValue(PeakBars(2,H,r3))-LastValue(PeakBars(1,H,r3));
r5:= (LastValue(Peak(1,H,r3))-LastValue(Peak(2, H,r3)))/r4; {slope}
r6:= LastValue(Peak(2, H,r3))+(r5*(Cum(1)-LastValue(Cum(1)- PeakBars(2,H,r3))));
r7:= If(Cum(1) <LastValue(Cum(1)-PeakBars(2,H,r3)),BarsSince(Cum(1)>=LastValue(Cum(1)-PeakBars( 2,H,r3))),r6);
s0:= If(MP()<=Ref(MP(),-1),ATR(1),0);
s1:= Log(If(s0>0,ATR(1),LOW)/LOW);
s2:= Cum(s1)/Max(1,Cum(If(s0>0,1,0)));
s3:= LastValue(100*Exp(LastValue(s2)))*pp;
s4:= LastValue(TroughBars(2,L,s3))-LastValue(TroughBars(1,L,s3));
s5:= (LastValue(Trough(1,L,s3))-LastValue(Trough(2,L,s3)))/s4; {slope}
s6:= LastValue(Trough(2,L,s3))+(s5*(Cum(1)-LastValue(Cum(1)-TroughBars(2,L,s3))));
s7:= If(Cum(1)<LastValue(Cum(1)-TroughBars(2,L,s3)),BarsSince(Cum(1)>=LastValue(Cum(1 )-TroughBars(2, L,s3))),s6);
r7;s7;

Please,

By the Explorer , I want to get securities that close cross the Up line from the indicator above.

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.