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

Re: [EquisMetaStock Group] Re: Help in explorer code ?



PureBytes Links

Trading Reference Links

Thanks for your reply. You are right, I need to reconsider my code. Frankly,I had tried many methods but the results is not so good. I'm now dry of ideas. Maybe someone can enlighten me.Thank you.
 
mun wai.
----- Original Message -----
From: pumrysh
Sent: Friday, October 24, 2008 11:34 AM
Subject: [EquisMetaStock Group] Re: Help in explorer code ?

Mun Wai,

Your code works but your last bar does not get calculated because of
your use of valuewhen in the b variable.

Do this.

Display your code as an indicator on a chart. What you will find is
that the last bar is blank or has a value of N/A...unable to
calculate.

You can also try this as your last line of code
Ref(Cross(H,ValueWhen(1,b,b)),-1)

Problem now is that you will be a day off with your signals which is
not what you want.

Looks like you will need to rethink your code.

Preston

--- In equismetastock@yahoogroups.com, wai <mwtang@xxx> wrote:
>
> I'm working to write an explorer code that do this :
> The market have made a new low and RSI(14) < 33. It then rebounce
forming a peak with RSI(14) > 60. Buy signal : if today high is
greater then the peak. The code is as below :
>
> a:= If(H>Ref(H,-1) AND Ref(H,1) < H AND RSI(14) > 60,H,0);{ high
peak}
>
> a1:= If(L < Ref(L,-1) AND Ref(L,1) > L AND RSI(14) < 33 ,L,0);{ low
trough}
>
> b:= If( ValueWhen(1,a,a) > ValueWhen(2,a1,a1) AND ValueWhen(1, a,MDI
(13)) < ValueWhen(2,a1,MDI(13)),a,0);
>
> Cross(H,ValueWhen(1,b,b))
>
> It works in Expert but not in Explorer. Can anyone help. Thank you !
>
> mun wai.
>

__._,_.___

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___