PureBytes Links
Trading Reference Links
|
Stephen,
Try substitute the line before tle last for this one:
mark:= result AND Cross(c4,0.5) AND Cross(tmp,0.5) = 0;
heitor
--- In Metastockusers@xxxxxxxxxxxxxxx, Stephen Dawson <dawsonsg@xxxx>
wrote:
> Hi Guys,
>
> I have writtten the formula (below) but am having problems with the
> implementation of an method. The code above doesn't implement the method
> properly.
>
> What I am attempting to do is when c1, c2 and c3 are true then mark
the NEXT
> bar with a symbol if the High is greater than the high the day the cross
> (evaluated to the 'result' variable) became true.
>
> If that does not happen I would like to mark the NEXT bar along
(with a symbol)
> if its high is higher than the previous day.
>
> What is happening is that a bar can be marked the day the cross
happens if its
> high is higher than the previous bar. The only bars that should be
marked are
> the two AFTER the cross returns the true result.
>
> I hope that makes sense.
>
> As always, any help appreciated.
>
> Regards
> Steve
>
>
> {Set some variables}
> PL:= LLV(L,8);
> PH:=HHV(H,8);
> SPeriod:=4;
>
> {Check all data elements are defined}
> AllDefined := IsDefined(ADX(14)) AND
> IsDefined(PL) AND IsDefined(PH) AND
> IsDefined(PDI(14)) AND IsDefined(MDI(14));
>
>
> {The three conditions that we req}
> c1:=ADX(14)>35;
> c2:=PDI(14)>MDI(14);
> c3:=(((C - PL)/(PH - PL))*100)<40;
> c4:= H>Ref(H,-1) OR H>Ref(H,-1);
>
> {This detects the first time that c1, c2 and c3 }
> {are TRUE. Result is set to TRUE and held for two}
> {more days}
> tmp:= If(AllDefined AND c1 AND c2 AND c3,1,0);
> result:=Alert(Cross(tmp,0.5),3);
>
> {Now check c4 against the result of c1, c2 and c3}
> mark:= result AND Cross(c4,0.5);
> mark
>
>
> Find local movie times and trailers on Yahoo! Movies.
> http://au.movies.yahoo.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/zMEolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Metastockusers/
<*> To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|