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

Re: [amibroker] Help with formula



PureBytes Links

Trading Reference Links




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); 
//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); 
//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 ADX<FONT 
color=#000000 size=1>(n2) < n1 AND <FONT color=#0000ff 
size=1>ADX(n2) > n3*<FONT 
color=#0000ff size=1>Ref(<FONT 
color=#0000ff size=1>ADX(n2),-<FONT 
color=#ff00ff size=1>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); 
//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); 
//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 ADX<FONT 
color=#000000 size=1>(n2) < n1 AND <FONT color=#0000ff 
size=1>ADX(n2) > n3*<FONT 
color=#0000ff size=1>Ref(<FONT 
color=#0000ff size=1>ADX(n2),-<FONT 
color=#ff00ff size=1>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
 
Henry






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.