PureBytes Links
Trading Reference Links
|
The only thing I would change in mrdavis9's reply to Henry is that the
Cross statement is telling AB to report to you IF the ADX() line crossed above
yesterday's ADX (times the coefficient). If that occurred at all today, then the
buy signal is generated. If you are using EOD data, then it can only occur once
today. The Cross function is not a counter; i.e., it does not determine how
many times the cross occurred. Other than that, mrdavis9's statement is
accurate.
AV
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
mrdavis9
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Friday, August 29, 2003 7:33
PM
Subject: Re: [amibroker] Help with
formula
HENRY, I have yet to learn about optimize, but I
can tell you about the the two ADX(n2)'s in the cross
function.
You use
"ref(" to tell Amibroker that you
want to refer to, or lookback to, an earlier bar, or day.
So
Cross(ADX(n2), n3*ref(ADX(n2),-1)); is
telling Amibroker to report to you the instances where the "ADX(n2)"
line
crossed
"n3*ref(ADX(n2),-1)" coming up from
below. The "-1" in this code is
referring to the most recent bar value of
ADX(n2). If you change the "-1" to
a "-2" , then you are referring to two bars back. Hope
this helps. Ron D
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
<A title=henry_chau@xxxxxxxxxxxxxxx
href="">Henry Chau
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Friday, August 29, 2003 3:47
PM
Subject: Re: [amibroker] Help with
formula
Thanks Jason + Al Venosa,
Thanks Jason for the formula : that's exactly
what I want , just a slight correction about cond2
Cond1=PDI<FONT color=#000000
size=1>(14<FONT color=#000000
size=1>)>MDI<FONT color=#000000
size=1>(14<FONT color=#000000
size=1>);
Cond2=Cross<FONT color=#000000
size=1>(ADX<FONT color=#000000
size=1>(14<FONT color=#000000
size=1>),MDI<FONT color=#000000
size=1>(14<FONT color=#000000
size=1>));
Cond3=Cond1 AND Cond2;
Filter=cond3;
AddColumn(cond3,<FONT
color=#ff00ff size=1>"My Test");
Buy=Cond3;
Thanks Al Venosa for your input , I like your use
of ADX system . Can you please comment if I understand it
correctly
BUY SIGNAL / LONG <FONT color=#000000
size=1>
n1=Optimize<FONT color=#000000
size=1>("n1"<FONT color=#000000
size=1>,15<FONT color=#000000
size=1>,12<FONT color=#000000
size=1>,20<FONT color=#000000
size=1>,1<FONT color=#000000
size=1>); //number that ADX must be less
than
n2=Optimize<FONT color=#000000
size=1>("n2"<FONT color=#000000
size=1>,18<FONT color=#000000
size=1>,10<FONT color=#000000
size=1>,22<FONT color=#000000
size=1>,1<FONT color=#000000
size=1>); //period of ADX, PDI, and
MDI
n3=Optimize<FONT color=#000000
size=1>("n3"<FONT color=#000000
size=1>,0.4<FONT color=#000000
size=1>,0.1<FONT color=#000000
size=1>,1<FONT color=#000000
size=1>,0.1<FONT color=#000000
size=1>); //fraction of uptick move
Cond1=PDI<FONT color=#000000
size=1>(n2)>MDI<FONT
color=#000000 size=1>(n2) AND <FONT color=#0000ff
size=1>ADX(n2) < n1 AND
ADX(n2)
> n3*Ref<FONT color=#000000
size=1>(ADX<FONT color=#000000
size=1>(n2),-1<FONT color=#000000
size=1>);
Buy=Ref<FONT color=#000000
size=1>(Cond1, -1<FONT
color=#000000 size=1>);
SELL SIGNAL / SHORT<FONT
color=#000000 size=1>
n1=Optimize<FONT color=#000000
size=1>("n1"<FONT color=#000000
size=1>,15<FONT color=#000000
size=1>,12<FONT color=#000000
size=1>,20<FONT color=#000000
size=1>,1<FONT color=#000000
size=1>); //number that ADX must be less
than
n2=Optimize<FONT color=#000000
size=1>("n2"<FONT color=#000000
size=1>,18<FONT color=#000000
size=1>,10<FONT color=#000000
size=1>,22<FONT color=#000000
size=1>,1<FONT color=#000000
size=1>); //period of ADX, PDI, and
MDI
n3=Optimize<FONT color=#000000
size=1>("n3"<FONT color=#000000
size=1>,0.4<FONT color=#000000
size=1>,0.1<FONT color=#000000
size=1>,1<FONT color=#000000
size=1>,0.1<FONT color=#000000
size=1>); //fraction of uptick move
Cond1=PDI<FONT color=#000000
size=1>(n2)<MDI<FONT
color=#000000 size=1>(n2) AND <FONT color=#0000ff
size=1>ADX(n2) < n1 AND
ADX(n2)
> n3*Ref<FONT color=#000000
size=1>(ADX<FONT color=#000000
size=1>(n2),-1<FONT color=#000000
size=1>);
Sell=Ref<FONT color=#000000
size=1>(Cond1, -1<FONT
color=#000000 size=1>);
Please explain further what the numbers
in the optimize ("n",?,?,?,?) refer to why is there 4 numbers?
And from your post
"If you prefer using Cross, you can modify Cond1 to:
Cond1=PDI(n2)>MDI(n2) and ADX(n2) < n1 AND <FONT
color=#0000ff>Cross(ADX(n2), n3*ref(ADX(n2),-1));<FONT
color=#000000>"
I don't understand Cross(ADX(n2),
n3*ref(ADX(n2),-1)) . How can you have a cross if
there is only one ADX line ? Sorry about my poor understanding of
AFL.
Also If I want to add a condition to the above Buy Search by only
looking for stocks which has been in consolidation for "x" days that is ADX
< 15 or 20 for x days , how do I add the code?
Thanks again for your input guys
Cheers
HenrySend BUG
REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page:
<A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Send
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Yahoo! Groups Sponsor
ADVERTISEMENT
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|