Harish and Bill,
If I was in your place, I would
write it something like this:
res:= ValueWhen(1
,RSI(C,9){today} < Ref(RSI(C,9),-1){yesterday} AND
ref(RSI(C,9),-1){yesterday} < Ref(RSI(C,9),-2){2 days ago} AND
ref(RSI(C,9),-3){3 days ago} > ref(RSI(C,9),-2){2 days ago} AND
ref(RSI(C,9),-3){3 days ago} > Ref(RSI(C,9),-4){4 days ago} AND
ref(RSI(C,9),-4){4 days ago} > Ref(RSI(C,9),-5){5 days
ago}, ref(RSI(C,9),-3); sup:= ValueWhen(1 ,RSI(C,9) >
Ref(RSI(C,9),-1) AND ref(RSI(C,9),-1) > Ref(RSI(C,9),-2) AND
ref(RSI(C,9),-3) < Ref(RSI(C,9),-2) AND ref(RSI(C,9),-3) <
Ref(RSI(C,9),-4) AND ref(RSI(C,9),-4) <
Ref(RSI(C,9),-5), ref(RSI(C,9),-3); res; sup;
This way, you are avoiding
referencing the RSI for a future value, which does not exist at the time of
evaluating the chart.
Maybe someone else can come up with
a more elegant way of coding it, but this is the method, I would
adopt.
----- Original Message -----
Sent: Wednesday, May 25, 2005 9:38
AM
Subject: Re: [EquisMetaStock Group] Re:
RSI Fractal coding question
Hi,
res:= ValueWhen(1 ,RSI(C,9) >
Ref(RSI(C,9),-1) AND RSI(C,9) > Ref(RSI(C,9),-2) AND RSI(C,9) >
Ref(RSI(C,9),1) AND RSI(C,9) > Ref(RSI(C,9),2), RSI(C,9)); sup:=
ValueWhen(1 ,RSI(C,9) < Ref(RSI(C,9),-1) AND RSI(C,9) <
Ref(RSI(C,9),-2) AND RSI(C,9) < Ref(RSI(C,9),1) AND RSI(C,9) <
Ref(RSI(C,9),2), RSI(C,9)); res; sup; for metastock ver < 8
replace RSI(c,9) with RSI(9)
Harish Chheda t_r_a_d_e_r2001 wrote:
I should clarify that I was trying to code for the value of a high
made by the RSI which had been preceded and followed by 2 lower
highs of the RSI. I still can't see why the code I gave is not valid.
Yahoo! Groups Links
Yahoo! India Matrimony: Find your life partner
online. |