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

Re: [amibroker] Help with formula



PureBytes Links

Trading Reference Links




Jason and Henry:
 
Chuck LeBeau suggests buying when the ADX(18) (he likes 18 days as the 
period) falls below 15 or 20 (end of the former trend, price in 
consolidation), then upticks relative to yesterday (beginning of the new trend) 
while the PDI(18) is above the MDI(18). Opposite for short. So, that would 
be:
 
n1=Optimize("n1",15,12,20,1); //number that ADX must be less than
n2=Optimize("n2",18,10,22,1); //period of ADX, PDI, and MDI
n3=Optimize("n3",0.4,0.1,1,0.1); //fraction of uptick move
Cond1=PDI(n2)>MDI(n2) and ADX(n2) < n1 AND ADX(n2) > 
n3*ref(ADX(n2),-1);
Buy=ref(Cond1, -1);
 
If you prefer using Cross, you can modify Cond1 to:

Cond1=PDI(n2)>MDI(n2) and ADX(n2) < n1 AND Cross(ADX(n2), 
n3*ref(ADX(n2),-1));
 
I think I'd prefer the first Cond1, but it might not make much difference. 

 
Al Venosa
 
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  Jayson 
  
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Friday, August 29, 2003 12:33 
  PM
  Subject: RE: [amibroker] Help with 
  formula
  
  <SPAN 
  class=851311716-29082003>Henry,
  I 
  think you would string the conditions together with cross and 
  AND
  <SPAN 
  class=851311716-29082003> 
   <FONT 
  color=#0000ff>
  Cond1=PDI(14)>MDI(14<FONT 
  face=Arial color=#0000ff>);<FONT 
  color=#0000ff>
  Cond2=Cross(ADX(14),PDI(14<SPAN 
  class=851311716-29082003>)<FONT 
  color=#0000ff>);<FONT 
  size=2>
  Cond3=Cond1 AND<FONT 
  face=Arial color=#0000ff> Cond2;
  <SPAN 
  class=851311716-29082003>filter=cond3;
  <SPAN 
  class=851311716-29082003>addcolumn(cond3,"My 
Test");
  <SPAN 
  class=851311716-29082003> 
  <SPAN 
  class=851311716-29082003>for your second ?? take a look at 
  HHV()    highest high value
   
   
  Regards, 
  Jayson 
  <FONT face=Tahoma 
  size=2>-----Original Message-----From: huuuchan1 
  [mailto:henry_chau@xxxxxxxxxxxxxxx]Sent: Friday, August 29, 2003 
  9:42 AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] 
  Help with formulaHi guys,ADX 
  SYSTEMI'm using the directional system to identify a new major trend. 
  E.g. when ADX(14) rises from below the two directional lines and crosses 
  -Dl(14) and +Dl(14) is above -D(14), a new uptrend is likely to start. 
  Can anyone help with the formula for amibroker to explore and set 
  alert ?Also an exploration to pick / alert stock with NEW HIGH IN 
  LAST X DAY ?thanks in advance 
  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.