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 : Tuesday, April 5, 2005 12:45:08 AM(UTC)
henry1224

Rank: Advanced Member

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

Was thanked: 1 time(s) in 1 post(s)
Here is my version for both buy and sell LL:=If(L=LLV(L,5),L,If(Ref(L,-1)=LLV(L,5),Ref(L,-1),If(Ref(L,-2)=LLV(L,5),Ref(L,-2),If(Ref(L,-3)=LLV(L,5),Ref(L,-3),If(Ref(L,-4)=LLV(L,5),Ref(L,-4),0))))); HH:=If(H=HHV(H,5),H,If(Ref(H,-1)=HHV(H,5),Ref(H,-1),If(Ref(H,-2)=HHV(H,5),Ref(H,-2),If(Ref(H,-3)=HHV(H,5),Ref(H,-3),If(Ref(H,-4)=HHV(H,5),Ref(H,-4),0))))); NH:=ValueWhen(1,H>Ref(HHV(H,5),-1),H); NL:=ValueWhen(1,L<Ref(LLV(L,5),-1),L); Set1:=HHV(H,3)<HHV(H,4); Set2:=LLV(L,3)>LLV(L,4); Val1:=ValueWhen(1,BarsSince(H>Ref(HHV(H,5),-1))=3 AND Set1=true,NH); Val2:=ValueWhen(1,BarsSince(L<Ref(LLV(L,5),-1))=3 AND Set2=true,NL); Val3:=ValueWhen(1,BarsSince(H>Ref(HHV(H,5),-1))=3 AND Set1=true,LL); Val4:=ValueWhen(1,BarsSince(L<Ref(LLV(L,5),-1))=3 AND Set2=true,HH); Per1:=Input("max length",10,100,30); RWH:=(H-Ref(L,-Per1))/(ATR(Per1)*Sqrt(Per1)); RWL:=(Ref(H,-Per1)-L)/(ATR(Per1)*Sqrt(Per1)); Pk:=Mov((RWH-RWL),3,W); TB:=If(Pk>0,Val1,Val4); BB:=If(Pk>0,Val3,Val2); TB;BB; Here is the original version for long LL:=If(L=LLV(L,5),L,If(Ref(L,-1)=LLV(L,5),Ref(L,-1),If(Ref(L,-2)=LLV(L,5),Ref(L,-2),If(Ref(L,-3)=LLV(L,5),Ref(L,-3),If(Ref(L,-4)=LLV(L,5),Ref(L,-4),0))))); NH:=ValueWhen(1,H>Ref(HHV(H,5),-1),H); Set1:=HHV(H,3)<HHV(H,4); Val1:=ValueWhen(1,BarsSince(H>Ref(HHV(H,5),-1))=3 AND Set1=true,NH); Val2:=ValueWhen(1,BarsSince(H>Ref(HHV(H,5),-1))=3 AND Set1=true,LL); TB:=Val1; BB:=Val2; TB;BB;
Users browsing this topic
Similar Topics
Darvas Box Channel (Formula Assistance)
by klkoo 6/7/2011 10:21:28 AM(UTC)
Darvas Box Automatically plotted (Product Wish List)
by nasdaqtrader 8/24/2007 6:34:57 AM(UTC)
Darvas Box plotter (Product Wish List)
by JDann 4/13/2006 1:21:35 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.