PureBytes Links
Trading Reference Links
|
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
------------------------ Yahoo! Groups Sponsor --------------------~-->
$4.98 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/BefplB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|