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

[amibroker] Divergences



PureBytes Links

Trading Reference Links




There 
is a wealth of information in the AFL Library, located on the ab web site. ATR 
is a built in function......here is arroon
 
Regards, 
Jayson
 
Apds=<FONT face=Arial 
color=#0000ff size=2>14<FONT face=Arial 
color=#0000ff>;
Aroondn=<FONT 
color=#0000ff>100* (apds - (( <FONT 
size=2>IIf (Ref 
(L<FONT 
color=#0000ff>,-1) == 
LLV( <FONT 
size=2>L<FONT 
size=2> ,apds ) ,1 , <FONT 
size=2>IIf ( Ref 
(L<FONT 
color=#0000ff> ,-2 ) == 
LLV ( <FONT 
size=2>L<FONT 
size=2>,apds ) ,2 , <FONT 
size=2>IIf ( Ref 
(L<FONT 
color=#0000ff> ,- 3<FONT 
color=#282828 size=2> ) == 

LLV<FONT color=#282828 
size=2>( L<FONT 
color=#282828 size=2>,apds ) ,3<FONT 
color=#282828 size=2> ,IIf<FONT 
color=#282828 size=2> ( Ref<FONT 
color=#282828 size=2> (L<FONT 
face=Arial> ,-<FONT color=#ff00ff 
size=2>4 ) == <FONT color=#0000ff 
size=2>LLV ( <FONT 
size=2>L ,apds ) 
,4 
,IIf 
(Ref ( 
L<FONT color=#282828 
size=2> ,-5 
) == LLV ( 
L<FONT color=#282828 
size=2> ,apds ) ,5<FONT color=#282828 
size=2> ,IIf 
(Ref 
(L<FONT color=#282828 
size=2> ,-6<FONT color=#282828 
size=2> ) ==
LLV<FONT color=#282828 
size=2>( L<FONT 
color=#282828 size=2>,apds ) ,6<FONT 
color=#282828 size=2> ,IIf<FONT 
color=#282828 size=2> ( Ref<FONT 
color=#282828 size=2> (L<FONT 
face=Arial> ,-<FONT color=#ff00ff 
size=2>7 ) == <FONT color=#0000ff 
size=2>LLV ( <FONT 
size=2>L,apds ) 
,7 
,IIf 
(Ref ( 
L<FONT color=#282828 
size=2> ,-8 
) == LLV ( 
L<FONT color=#282828 
size=2> ,apds ) ,8<FONT color=#282828 
size=2> ,IIf 
(Ref( 
L<FONT color=#282828 
size=2> ,-9<FONT color=#282828 
size=2> ) ==
LLV<FONT color=#282828 
size=2>( L<FONT 
color=#282828 size=2>,apds ) ,9<FONT 
color=#282828 size=2> ,IIf<FONT 
color=#282828 size=2> ( Ref<FONT 
color=#282828 size=2> (L<FONT 
face=Arial>,-<FONT color=#ff00ff 
size=2>10) == <FONT color=#0000ff 
size=2>LLV (<FONT 
size=2>L,apds ) 
,10 
,IIf 
(Ref 
(L<FONT color=#282828 
size=2> ,-11<FONT color=#282828 
size=2>) == LLV<FONT color=#282828 
size=2>( L<FONT 
color=#282828 size=2>,apds ) ,11<FONT 
color=#282828 size=2> ,IIf<FONT 
color=#282828 size=2> (Ref<FONT 
color=#282828 size=2>(L<FONT 
face=Arial>,-<FONT color=#ff00ff 
size=2>12 ) 
==
LLV<FONT color=#282828 
size=2>(L<FONT 
color=#282828 size=2> ,apds) ,12<FONT 
color=#282828 size=2>,IIf<FONT 
color=#282828 size=2> ( Ref<FONT 
color=#282828 size=2> (L<FONT 
face=Arial>,-<FONT color=#ff00ff 
size=2>13) == <FONT color=#0000ff 
size=2>LLV (<FONT 
size=2>L ,apds ) 
,13 
,IIf ( 
Ref ( 
L<FONT color=#282828 
size=2>,-apds) == LLV<FONT 
color=#282828 size=2>( L<FONT 
face=Arial>,apds ) ,apds ,<FONT color=#ff00ff 
size=2>0) ) ) ) ) ) ) 
) ) ) ) ) ) ) ) ) ) / apds;
Aroonup= <FONT 
face=Arial>100 * ( apds - ( 
( IIf (<FONT 
size=2>Ref (<FONT 
size=2>H<FONT 
size=2> ,-1) == <FONT 
size=2>HHV(<FONT 
size=2>H<FONT 
size=2> ,apds ) ,1 ,<FONT 
size=2>IIf (Ref 
(H<FONT 
color=#0000ff> ,-2 ) == 
HHV (<FONT 
size=2>H<FONT 
size=2> ,apds ) ,2 ,<FONT 
size=2>IIf (Ref 
(H<FONT 
color=#0000ff> ,- 3<FONT 
color=#282828 size=2> ) == 

HHV<FONT color=#282828 
size=2>(H<FONT 
color=#282828 size=2> ,apds ) ,3<FONT 
color=#282828 size=2>, IIf<FONT 
color=#282828 size=2> (Ref<FONT 
color=#282828 size=2> (H<FONT 
face=Arial> ,-<FONT color=#ff00ff 
size=2>4 ) == <FONT color=#0000ff 
size=2>HHV(<FONT 
size=2>H ,apds ) 
,4 
,IIf 
(Ref 
(H<FONT color=#282828 
size=2> ,-5 
) == HHV<FONT color=#282828 
size=2>(H<FONT 
color=#282828 size=2> ,apds ) ,5<FONT 
color=#282828 size=2> ,IIf<FONT 
color=#282828 size=2> (Ref<FONT 
color=#282828 size=2> (H<FONT 
face=Arial> ,-<FONT color=#ff00ff 
size=2>6 ) 
==
HHV<FONT color=#282828 
size=2>(H<FONT 
color=#282828 size=2> ,apds ) ,6<FONT 
color=#282828 size=2> ,IIf<FONT 
color=#282828 size=2> (Ref<FONT 
color=#282828 size=2> (H<FONT 
face=Arial>,-<FONT color=#ff00ff 
size=2>7 ) == <FONT color=#0000ff 
size=2>HHV(<FONT 
size=2>H ,apds ) 
,7 
,IIf 
(Ref 
(H<FONT color=#282828 
size=2> ,-8 
) == HHV<FONT color=#282828 
size=2>(H<FONT 
color=#282828 size=2> ,apds) ,8<FONT 
color=#282828 size=2> , IIf<FONT 
color=#282828 size=2> (Ref<FONT 
color=#282828 size=2> (H<FONT 
face=Arial> ,-<FONT color=#ff00ff 
size=2>9 ) 
==
HHV<FONT color=#282828 
size=2>(H<FONT 
color=#282828 size=2> ,apds) ,9<FONT 
color=#282828 size=2> ,IIf<FONT 
color=#282828 size=2> (Ref<FONT 
color=#282828 size=2> (H<FONT 
face=Arial> ,-<FONT color=#ff00ff 
size=2>10 ) == <FONT color=#0000ff 
size=2>HHV(<FONT 
size=2>H ,apds ) 
,10 
,IIf 
(Ref 
(H<FONT color=#282828 
size=2> ,-11 
) == HHV<FONT color=#282828 
size=2>(H<FONT 
color=#282828 size=2> ,apds) ,11<FONT 
color=#282828 size=2> ,IIf<FONT 
color=#282828 size=2> (Ref<FONT 
color=#282828 size=2> (H<FONT 
face=Arial> ,-<FONT color=#ff00ff 
size=2>12 ) 
==
HHV<FONT color=#282828 
size=2>(H<FONT 
color=#282828 size=2> ,apds) ,12<FONT 
color=#282828 size=2> ,IIf<FONT 
color=#282828 size=2> (Ref<FONT 
color=#282828 size=2>(H<FONT 
face=Arial> ,-<FONT color=#ff00ff 
size=2>13) == <FONT color=#0000ff 
size=2>HHV(<FONT 
size=2>H ,apds ) 
,13 
,IIf 
(Ref 
(H<FONT color=#282828 
size=2> ,-apds ) == HHV<FONT 
color=#282828 size=2>(H<FONT 
face=Arial> ,apds ) ,apds ,<FONT color=#ff00ff 
size=2>0 ) ) ) ) ) ) ) 
) ) ) ) ) ) ) ) ) ) / apds;
Plot<FONT color=#282828 
size=2>(IIf<FONT color=#282828 
size=2>(Aroonup>=70<FONT 
color=#282828 size=2>,aroonup,IIf<FONT 
color=#282828 size=2>(aroondn>=<FONT color=#ff00ff 
size=2>70,aroondn,<FONT color=#ff00ff 
size=2>0)),<FONT color=#ff00ff 
size=2>"",<FONT color=#0000ff 
size=2>IIf(aroonup>=<FONT 
color=#ff00ff size=2>70,<FONT 
size=2>colorDarkGreen<FONT color=#282828 
size=2>,IIf<FONT color=#282828 
size=2>(aroondn>=70<FONT 
color=#282828 size=2>,colorDarkRed<FONT 
face=Arial>,<FONT 
size=2>colorYellow 
)),16384<FONT color=#282828 
size=2>);
Plot<FONT color=#282828 
size=2>(50<FONT color=#282828 
size=2>,""<FONT color=#282828 
size=2>,colorYellow<FONT 
face=Arial>,<FONT color=#ff00ff 
size=2>16384<FONT 
face=Arial>);
Buy<FONT 
color=#0000ff>=Cross<FONT 
size=2>(Aroonup,70<FONT color=#282828 
size=2>);
Sell<FONT 
color=#0000ff>=Cross<FONT 
size=2>(70<FONT color=#282828 
size=2>,Aroonup);
 
<FONT face=Tahoma 
size=2>-----Original Message-----From: y0h0070815 
[mailto:fjdobelmann@xxxxxx]Sent: Wednesday, January 21, 2004 3:28 
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Aroon 
and ATRHello,I need two indicators for testing a 
new trading system and i am new in programming AFL.So i need the 
following indicators and i hope somebody can help me:1. Aroon 
Indicator###############################################Market Maker 
Formular###############################################{Market Maker 
Version byWolfgang 
Lindner}$Timeperiod2:=$Timeperiod+1;$high:=ZcHigh;$HH:=$high.PeriodenMaximum[$Timeperiod2];$aroon_up:=100*($Timeperiod-Map(#[](if($high.Before[object]=$HH;object;$Timeperiod2));MakeList($Timeperiod2)).Fold[#Min;$Timeperiod2])/$Timeperiod;$Low:=ZcLow;$LL:=$Low.PeriodenMinimum[$Timeperiod2];$aroon_down:=100*($Timeperiod-Map(#[](if($Low.Before[object]=$LL;object;$Timeperiod2));MakeList($Timeperiod2)).Fold[#Min;$Timeperiod2])/$Timeperiod;LinesMulti($aroon_up;$aroon_down).LineNames["AROON_up";"AROON_down"] 
###############################################TradeStation 4.0 / 
2000i###############################################The Aroon 
up:Input:Len(21),DivLen(21),Down(25),Up(75);Vars : 
Return(0),AroonUp(0);AroonUp = 100 * 
((Len-HighestBar(High,Len)),DivLen);Plot1(AroonUp,"AroonUP");Plot2(Down,"Down");Plot3(Up,"Up");The 
Aroon down:Input:Len(21),DivLen(21),Midline(50);Vars : 
Return(0),AroonDown(0);AroonDown = 100 * 
((Len-HighestBar(High,Len)),DivLen);Plot1(AroonDown," AroonDown 
");Plot2(Midline," Midline ");2. Average True Range (ATR) Wilder's 
Volatility###############################################MetaStock 
Custom Formula 
Collection###############################################In his book New 
Concepts in Technical Trading Systems, J. Welles Wilder Jr. talks about 
volatility and describes his Volatility Index and Volatility System. Both of 
these can be performed in MetaStock™ for Windows. This document describes 
how to construct both the index and the system.The Volatility Index (VI) 
is described by Wilder as:VI Today = (13 * VI Prev + TR1) / 14   
where TR1 is today's true range.He defines the true range as the 
greatest of the following:The distance from today's high to today's 
low  The distance from yesterday's close to today's high, 
or  The distance from yesterday's close to today's low. In 
MetaStock version 5.0 or higher you would use the following function.VI 
Today = ATR(14)The Volatility System is:Enter 
LongCross(C,Ref(LLV(C,7),-1)+(Ref(ATR(7),-1)*3))Enter 
ShortCross(Ref(HHV(C,7),-1)-(Ref(ATR(7),-1)*3),C)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 


Yahoo! Groups Links
  To visit your group on the web, go to:<A 
  href="">http://groups.yahoo.com/group/amibroker/  

  To unsubscribe from this group, send an email to:<A 
  href="">amibroker-unsubscribe@xxxxxxxxxxxxxxx  

  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 



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








Yahoo! Groups Sponsor


  ADVERTISEMENT 









Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/ 
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.