Error

 Previous Topic Next Topic
 ferrdav #1 Posted : Friday, July 7, 2006 6:54:19 PM(UTC) Rank: NewbieGroups: Registered, Registered UsersJoined: 8/22/2005(UTC)Posts: 8Location: ITALY I use this formula to be LONG: FILTER:= ADX(13) >15; FILTER1:= PDI(13) > MDI(13); B:=Ref(1.02*LLV(L,42),-1); A1:=Ref(0.98*HHV(H,42),-1); mi:=(A1+B)/2; LE:=C>=Mi; SE:=CSE) AND FILTER AND FILTER1 Iâ€™d like to modify this formula in order to close long position even when I have 5 consecutive days with ADX(13) < REF(ADX(13),-1) AND not to get in long as soon as I have my long condition verified AND (this time) ADX(13) > REF(ADX(13),-1). To count consecutive bars with ADX(13) < REF(ADX(13),-1) I use this formula: FR:=ADX(13)Mov(H,30,VOL); B:=Mov(Ref(1.02*LLV(L,42),0),3,VOL); A1:=Mov(Ref(0.98*HHV(H,42),0),3,VOL); mi:=(A1+B)/2; LE:=C>=Mi; SE:=CSE,0); Count:=If(PREV=0,If(Cond,1,0),If(Cond,PREV+1,0)); Cntdwn:=If(Ref(Count,-1)>=5,0,Count); Cntdwn Letâ€™s call it FILTER_TRADE_LONG Can anyone help me? I got crazy with this.. #-o Second question: Iâ€™m looking to a valid filter to isolate congestion (non trending periods) avoiding noises. Any valid suggestion? I use FILTER and FILTER1. They work fine but false signal are, in some situation, too noising. many thank'sin advance
 Wanna join the discussion?! Login to your Discussions forum accountor Register a new forum account.
 wabbit #2 Posted : Saturday, July 8, 2006 6:49:02 AM(UTC) Rank: Advanced MemberGroups: Registered, Registered Users, Subscribers, Unverified UsersJoined: 10/28/2004(UTC)Posts: 3,111Location: Perth, Western AustraliaWas thanked: 16 time(s) in 16 post(s) ferrdav wrote:To count consecutive bars with ADX(13) < REF(ADX(13),-1) I use this formula: for 5 consecutive days try either: Barssince(ADX(13) >= REF(ADX(13),-1))=5; or Sum(ADX(13) < REF(ADX(13),-1),5)=5; Its heaps faster than using PREVs. ferrdav wrote:Second question: I'm looking to a valid filter to isolate congestion (non trending periods) avoiding noises. Any valid suggestion? I use FILTER and FILTER1. They work fine but false signal are, in some situation, too noising. I don't understand what you are getting at here? Can you post a chart showing an example of what conditions you are trying to achieve/avoid? Hope this helps. wabbit :D
 ferrdav #3 Posted : Saturday, July 8, 2006 10:17:07 AM(UTC) Rank: NewbieGroups: Registered, Registered UsersJoined: 8/22/2005(UTC)Posts: 8Location: ITALY Thankâ€™s wabbit. Your code is much better.. I modified my long entry signal like this: TREND:=Mov(H*1.02,3,VOL)>Mov(H,30,VOL); COUNT:=BarsSince(ADX(13) >= Ref(ADX(13),-1)); FILTER:= ADX(13) >15; FILTER1:= PDI(13) > MDI(13); B:=Ref(1.02*LLV(L,42),-1); A1:=Ref(0.98*HHV(H,42),-1); mi:=(A1+B)/2; LE:=C>=Mi; SE:=CSE),0) Now what Iâ€™d like to get, if possible, is: Once I close long position because BarsSince(ADX(13) >= Ref(ADX(13),-1))=5 is verified, next long signal should take place only if ADX(13) > Ref(ADX(13),-1) About a filter for non trending markets. I mean avoiding situation like this As you can see before having a valid buy signal I get 5 consecutive false signal (in this chart blue is buy, yellow sell).
 Users browsing this topic
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.