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

Notification

Icon
Error

Options
Go to last post Go to first unread
henry1224  
#1 Posted : Sunday, July 17, 2005 12:07:57 AM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
This indicator is from jose Silva {Trendline - adjustable} {©Copyright 2003 Jose Silva} pds:= Input("average trend length periods",2,252,21); pr:=Input("use Open=1 High=2 Low=3 Close=4 Volume=5 MP=6",1,6,4); display:=Input("Trend line = 1, Trend points = 2",1,2,1); {define events} pr:=If(pr=1,O,If(pr=2,H,If(pr=3,L,If(pr=5,V, If(pr=6,MP(),C))))); price1:=pr; price2:=pr; time1:=price1>Ref(HHV(price1,pds),-1); time2:=price2<Ref(LLV(price2,pds),-1); {restrict to last events} time1:=time1 AND Cum(time1)=LastValue(Cum(time1)); time2:=time2 AND Cum(time2)=LastValue(Cum(time2)); {sort events} t1pds:=LastValue(BarsSince(time1)); t2pds:=LastValue(BarsSince(time2)); x1:=If(t1pds>=t2pds,time1,time2); x2:=If(t1pds>=t2pds,time2,time1); y1:=If(t1pds>=t2pds,price1,price2); y2:=If(t1pds>=t2pds,price2,price1); {fix coordinates} y1:=ValueWhen(1,x1,y1); y2:=LastValue(ValueWhen(1,x2,y2)); b1:=LastValue(BarsSince(x1)); b2:=LastValue(BarsSince(x2)); plot:=y1+BarsSince(x1)*(y2-y1)/(b1-b2); If(display=1,plot,Time1+Time2)
henry1224  
#2 Posted : Sunday, July 17, 2005 12:09:34 AM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
This indicator is from Victor H ppr:=Input("Longest=4,Longer=3,Long=2,Med=1,Short=.5",0.5,4,2); pps:=Input("Longest=4,Longer=3,Long=2,Med=1,Short=.5",0.5,4,2); z1:= Cum(Log(If(If(MP()>=Ref(MP(),-1),ATR(1),0)>0,ATR(1),H)/H))/Max(1,Cum(If(If(MP()>=Ref(MP(),-1),ATR(1),0)>0,1,0))); r1:= LastValue(100*Exp(LastValue(z1)))*ppr; r2:= LastValue(Peak(1,H,r1))- LastValue(Peak(2,H,r1)); r3:= LastValue(PeakBars(2,H,r1))-LastValue(PeakBars(1,H,r1)); r4:= r2/r3; {Slope} r6:= LastValue(Cum(1)- PeakBars(2,H,r1)); r7:= LastValue(Peak(2,H,r1))+(r4*( Cum(1)-r6)); r8:=If(Cum(1)<r6,BarsSince(Cum(1)>=r6),r7); z2:= Cum(Log(If(If(MP()<=Ref(MP(),-1),ATR(1),0)>0,ATR(1),L)/L))/Max(1, Cum(If(If(MP()<=Ref(MP(),-1),ATR(1),0)>0,1,0))); s1:= LastValue(100*Exp(LastValue(z2)))*pps; s2:= LastValue(Trough(1,L,s1))- LastValue(Trough(2,L,s1)); s3:= LastValue(TroughBars(2,L,s1))-LastValue(TroughBars(1,L,s1)); s4:= s2/s3; {Slope} s6:= LastValue(Cum(1)- TroughBars(2,L,s1)); s7:= LastValue(Trough(2,L,s1))+(s4*( Cum(1)-s6)); s8:=If(Cum(1)<s6,BarsSince(Cum(1)>=s6),s7); R8;S8;
henry1224  
#3 Posted : Sunday, July 17, 2005 12:11:26 AM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
This indicator is from Victor H {Resistance Trendlines} pp:= Input("Long = 2,Med = 1,Short = 0.5", 0.5,6,2); x0:= If(MP()>=Ref(MP(),-1),ATR(1),0); y0:= Cum(If(x0>0,1,0)); z1:= If(x0>0,ATR(1),HIGH); z2:=Log(z1/HIGH); z3:= Cum(z2)/Max(1,y0); z4:= 100*Exp(LastValue(z3)); a1:= LastValue(z4)*pp; a2:= LastValue(Peak(1,H,a1)); a3:= LastValue(Peak(2,H,a1)); a4:= a2-a3; a5a:=PeakBars(2,H,a1); a5b:=PeakBars(1,H,a1); a5:= LastValue(a5a)-LastValue(a5b); a6:= a4/a5; {Slope} a7:= LastValue(Cum(1)-a5b); a8:= LastValue(Cum(1)-a5a); a9:= Cum(1); a10:=a3+(a6*(a9-a8)); a11:=If(a9<a8,BarsSince(a9>=a8),a10); a11;
henry1224  
#4 Posted : Sunday, July 17, 2005 12:12:52 AM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
This indicator is from Victor H pp:= Input("Long = 2,Med = 1,Short = 0.5", 0.5,4,2); x0:= If(MP()<=Ref(MP(),-1),ATR(1),0); y0:= Cum(If(x0>0,1,0)); z1:= If(x0>0,ATR(1),LOW); z2:=Log(z1/LOW); z3:= Cum(z2)/Max(1,y0); z4:= 100*Exp(LastValue(z3)); a1:= LastValue(z4)*pp; a2:= LastValue(Trough(1,L,a1)); a3:= LastValue(Trough(2,L,a1)); a4:= a2-a3; a5a:=TroughBars(2,L,a1); a5b:=TroughBars(1,L,a1); a5:= LastValue(a5a)-LastValue(a5b); a6:= a4/a5; {Slope} a7:= LastValue(Cum(1)-a5b); a8:= LastValue(Cum(1)-a5a); a9:= Cum(1); a10:=a3+(a6*(a9-a8)); a11:=If(a9<a8,BarsSince(a9>=a8),a10); a11;
Users browsing this topic
Guest (Hidden)
Similar Topics
MS15 SEMI-LOG trendlines slope bug, solved? (MetaStock)
by greg550 11/1/2016 9:33:53 PM(UTC)
Trendlines not aligned between timeframes (MetaStock)
by Black Swan 2/1/2011 2:36:07 PM(UTC)
Anti-aliasing of trendlines and indicators (Product Wish List)
by trader bill 4/6/2008 7:06:32 PM(UTC)
Trendlines On RSI (MetaStock)
by mwaseemtaqi 11/9/2007 11:16:45 AM(UTC)
Drawing vertical lines - not trendlines [RESOLVED] (MetaStock)
by Mouse 7/2/2007 3:12:30 AM(UTC)
How to Draw Trendlines (MetaStock)
by aspTrader 5/1/2006 5:38:03 PM(UTC)
Automatic Trendlines (Formula Assistance)
by dklugmann 10/23/2005 1:06:09 PM(UTC)
Saving trendlines in a template [RESOLVED] (MetaStock)
by dod 5/2/2005 8:52:08 AM(UTC)
Auto Trendlines [RESOLVED] (Formula Assistance)
by Topkat 2/8/2005 9:56:36 PM(UTC)
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.