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