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

Notification

Icon
Error

Options
Go to last post Go to first unread
ferrdav  
#1 Posted : Friday, July 7, 2006 6:54:19 PM(UTC)
ferrdav

Rank: Newbie

Groups: Registered, Registered Users
Joined: 8/22/2005(UTC)
Posts: 8
Location: 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:=C<mi; (LE>SE) 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)<Ref(ADX(13),-1); TrendUp:=Mov(H*1.02,3,VOL)>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:=C<mi; Cond:= If(TrendUp AND FR,LE>SE,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
wabbit  
#2 Posted : Saturday, July 8, 2006 6:49:02 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was 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)
ferrdav

Rank: Newbie

Groups: Registered, Registered Users
Joined: 8/22/2005(UTC)
Posts: 8
Location: 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:=C<mi; If(TREND AND FILTER AND FILTER1 AND COUNT<5,(LE>SE),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 UserPostedImage 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.