[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: question



PureBytes Links

Trading Reference Links

You are right Pierre !
    with and " = " it is no more a NEW high but a New
High OR an Equal   :-( (
Concerning the new highs, I am a little perplexe, even without parenthesis
I do not find a new high which is not one, at least on the French market.
Verification with :
colA    H > Ref(HHV(H,30),-1)
colB    H
colC   Ref(HHV(H,30),-1)
and Filter    colA
 
 
    Has anyone tried to optimize the John's formulation
?
 
Regards,
 
Pierre Tremblay a écrit :
Amadeus and John,
To search for a new 30 days high or low I would remove the = sign in
these conditions :
AND H >= Ref(HHV(H,30),-1)
AND L <= Ref(LLV(L,30),-1)
I tried the exploration but I got some stocks that aren't at a new 30
days high :
For october 30, I got CPQ : high = 31.08 and Ref(HHV(H,30),-1) = 31.625
and HET : high = 28 and Ref(HHV(H,30),-1) = 28.187.
To correct this problem, I have to put parentheses. so the exploration
become :
Col A = Long filter : If((MACD() > 0)
AND (C > Mov(C,10,E))
AND (RSI(21) > 50)
AND (Cross(MACD(), Mov(MACD(),9,E))
AND (C <= BBandTop(C,20,S,2)) AND (C >= BBandBot(C,20,S,2))
AND (H > Ref(HHV(H,30),-1))
AND (C > Ref(C,-1))),
       +1,0)
Col B = Short filter :
If((MACD() < 0)
AND (C < Mov(C,10,E))
AND (RSI(21) < 50)
AND (Cross(Mov(MACD(),9,E),MACD()))
AND (C <= BBandTop(C,20,S,2)) AND (C >= BBandBot(C,20,S,2))
AND (L < Ref(LLV(L,30),-1))
AND (C < Ref(C,-1)),
       +1,0)
Filter :
colA OR colB
 
I hope this help,
Pierre Tremblay
 
 
 
Amadeus a écrit :
> Try it this way John :
>
>
> Col A = Long filter :
>
> If(
>         MACD() > 0
> AND C > Mov(C,10,E)
> AND RSI(21) > 50
> AND Cross(MACD(), Mov(MACD(),9,E)
> AND C <= BBandTop(C,20,S,2) AND C >= BBandBot(C,20,S,2)
> AND H >= Ref(HHV(H,30),-1)
> AND C > Ref(C,-1),
>         +1,0)
>
> Col B = Short filter :
>
> If(
>         MACD() < 0
> AND C < Mov(C,10,E)
> AND RSI(21) < 50
> AND Cross(Mov(Macd(),9,E),Macd())
> AND C <= BBandTop(C,20,S,2) AND C >= BBandBot(C,20,S,2)
> AND L <= Ref(LLV(L,30),-1)
> AND C < Ref(C,-1)),
>         +1,0)
>
> To get the result in a binary form, you can add a Col C, with :
>
> A:=
> If( MACD() > 0
> AND C > Mov(C,10,E)
> AND  RSI(21) > 50
> AND Cross(MACD(), Mov(MACD(),9,E)
> AND C <= BBandTop(C,20,S,2) AND C >= BBandBot(C,20,S,2)
> AND H >= Ref(HHV(H,30),-1)
> AND C > Ref(C,-1)),+1,0);
>
> B:=
> If( MACD() < 0
> AND C < Mov(C,10,E)
> AND  RSI(21) < 50
> AND Cross(Mov(MACD(),9,E),MACD())
> AND C <= BBandTop(C,20,S,2) AND C >= BBandBot(C,20,S,2)
> AND L <= Ref(LLV(L,30),-1)
> AND C < Ref(C,-1),-1,0);
>
> A + B
>
> { Then you don't need anymore ColA and ColB }
>
> And one can also add in the Filter, the same as in col C, but with
an
> " A OR B " instead " A plus B " at the end.
>
>
>     Ave,
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> john graham duff a écrit :
>
> i,ve written the formulas below to screen stocks/indices for long
and
> short trades, to include the criteria :
>
> macd to be above/below 0,
> close price above/below 10 dma,
> 21 period rsi to be above/below 50,
> macd to be crossing above/below the 9 period signal line,
> price within bollinger bands,
> the price at a new 30 day high/low
> and the price to be higher/lower than yesterday's close.
>
> these formulas seem to work but i,m not sure that i,m using the
> correct syntax the price is the highest/lowest for 30 days,this part
> of the formula does not work ?
> could you please give the formulas a quick check over,
>
> cheers, john
>
>
>
>
>
>
>
> (long filter)
>
> If (MACD() > 0  AND CLOSE > Mov(CLOSE,10,E) AND RSI(21) > 50
AND
> MACD() > Mov(MACD(),9,E)
> AND CLOSE < Mov(C,20,S) + (2*(Std(C,20)))
> AND CLOSE > Mov(C,20,S) - (2*(Std(C,20)))
> AND HHV(H,30),
> AND CLOSE > ref(close,-1) +1, 0)
>
> (short filter)
> If(MACD() < 0 AND CLOSE < Mov(CLOSE,10,E) AND RSI(21) <
50 AND MACD()
> < Mov(MACD(),9,E)
> AND CLOSE < Mov(C,20,S) + (2*(Std(C,20)))
> AND CLOSE > Mov(C,20,S) - (2*(Std(C,20)))
> AND CLOSE < ref(close,-1) and llv(l,30) ,+1, 0)
>




  • References: