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

RE: [amibroker] //MAMA & FAMA from ehlers.dll in new AB



PureBytes Links

Trading Reference Links


<SPAN 
class=039395020-27072002>Hi
<SPAN 
class=039395020-27072002> 
If you 
let me know 5 or 6 symbols which are incorrect I will set up a Yahoo database 
and see what the problem is.  Unfortunately I tested the DLL with TC2000 
data and no bugs appeared during testing.
<SPAN 
class=039395020-27072002> 
<SPAN 
class=039395020-27072002>Stefan

<FONT face=Tahoma 
size=2>-----Original Message-----From: Nurudin Kaba 
[mailto:n.kaba@xxxx]Sent: 28 July 2002 00:12To: 
amibroker@xxxxxxxxxxxxxxxSubject: RE: [amibroker] //MAMA &FAMA 
from ehlers.dll in new AB
<FONT face=Arial color=#0000ff 
size=2>Yes...i agree...A Great Big Thanks to the both of 
you.

<FONT face=Tahoma 
size=2>-----Original Message-----From: Tomasz Janeczko 
[mailto:amibroker@xxxx]Sent: Saturday, July 27, 2002 1:06 
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: 
[amibroker] //MAMA & FAMA from ehlers.dll in new AB
Hello,
 
Yes we were talking about elders.dll. I just wantedto 
verify if the problem is inside AmiBroker or 
is it in elders.dll. I checked both. I also have 
negative values with elders.dll for symbols with short 
histories.
The problem does not exist for scripting 
version.
 
So it appears that DLL version has a bug. But... this can 
only be fixed by Stefan (not me - sorry),
simply because Stefan has written the DLL and generously 
offered it to the group.
Best regards,Tomasz Janeczkoamibroker.com
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
Nurudin 
Kaba 
To: <A 
title=amibroker@xxxxxxxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx 

Sent: Sunday, July 28, 2002 12:53 
AM
Subject: RE: [amibroker] //MAMA & 
FAMA from ehlers.dll in new AB

<FONT face=Arial color=#0000ff 
size=2>Sorry, Tomasz...the vbscript version DOES work....it's the 
elders.dll version that does NOT work with SOME symbols.  This is the 
version, I think we are talking
<FONT face=Arial color=#0000ff 
size=2>about.  The price scale is in the NEGATIVE millions andthat's 
why there is the arc in the attachment I sent recently.  Your version 
works...
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>Thanks

<FONT face=Tahoma 
size=2>-----Original Message-----From: Tomasz Janeczko 
[mailto:amibroker@xxxx]Sent: Saturday, July 27, 2002 12:45 
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: 
[amibroker] //MAMA & FAMA from ehlers.dll in new 
AB
Hello,
 
I can not speak for Stefan, but I checked the VBScript 
version available from Member's area and it works fine. 
 

/* MESA Adaptive Moving Averages: ** MAMA and FAMA**** From Stocks 
& Commodities 7/2001**** AFL implementation by Tomasz Janeczko, 
October 2001**** For faster operation please check DLL 
version**/
EnableScript(<FONT 
face="Courier New" color=#ff00ff size=1>"VBScript"<FONT 
face="Courier New" size=1>);
FastLimit=<FONT face="Courier New" color=#ff00ff 
size=1>0.5;
SlowLimit=<FONT face="Courier New" color=#ff00ff 
size=1>0.05;
Price = (H+L)/<FONT face="Courier New" 
color=#ff00ff size=1>2;
Smooth = ( <FONT face="Courier New" color=#ff00ff 
size=1>4 * Price + <FONT 
face="Courier New" color=#ff00ff size=1>3<FONT face="Courier New" 
size=1> * <FONT face="Courier New" color=#0000ff 
size=1>Ref( Price,-<FONT 
face="Courier New" color=#ff00ff size=1>1<FONT face="Courier New" 
size=1>) + <FONT face="Courier New" color=#ff00ff 
size=1>2 * <FONT 
face="Courier New" color=#0000ff size=1>Ref<FONT 
face="Courier New" size=1>(Price,-<FONT face="Courier New" 
color=#ff00ff size=1>2) + 
Ref<FONT 
face="Courier New" size=1>(Price,-<FONT face="Courier New" 
color=#ff00ff size=1>3<FONT face="Courier New" 
size=1>))/<FONT face="Courier New" color=#ff00ff 
size=1>10;
<%
Price = AFL(<FONT face="Courier New" color=#ff00ff 
size=1>"Price")
Smooth = AFL(<FONT face="Courier New" color=#ff00ff 
size=1>"Smooth")
nSize = UBound( Smooth )
' every Other Variable is an array Of the same size as smooth
' so just make A copy (quick init) 
Detrender = Smooth
II2 = Smooth
Q2 = Smooth
Re = Smooth
Im = Smooth
I1 = Smooth
Q1 = Smooth
jl = Smooth
jQ = Smooth
Phase = Smooth
DeltaPhase = Smooth
Period = Smooth
PI = <FONT face="Courier New" color=#ff00ff 
size=1>3.1415926
For i = <FONT face="Courier New" color=#ff00ff 
size=1>0 To nSize 
 
If i < <FONT face="Courier New" color=#ff00ff 
size=1>6 then 
' init previous values to avoid problems 
' with <FONT face="Courier New" color=#0000ff 
size=1>exp. averaging of 
uninitialized values
' later
DeltaPhase( i ) = <FONT face="Courier New" color=#ff00ff 
size=1>0
II2( i ) = <FONT face="Courier New" color=#ff00ff 
size=1>1.0
Q2( i ) = <FONT face="Courier New" color=#ff00ff 
size=1>1.0
Re( i ) = <FONT face="Courier New" color=#ff00ff 
size=1>0
Im( i ) = <FONT face="Courier New" color=#ff00ff 
size=1>0
Period( i ) = <FONT face="Courier New" color=#ff00ff 
size=1>6
Else

factor = <FONT face="Courier New" color=#ff00ff 
size=1>0.075 * Period(i - 
1<FONT 
face="Courier New" size=1> ) + <FONT face="Courier New" 
color=#ff00ff size=1>0.54
Detrender( i ) = ( ( <FONT face="Courier New" color=#ff00ff 
size=1>0.0962 *Smooth(i ) + 
0.5769<FONT 
face="Courier New" size=1> * Smooth( i - <FONT face="Courier New" 
color=#ff00ff size=1>2 ) _
- <FONT face="Courier New" color=#ff00ff 
size=1>0.5769 * Smooth( i - 
4<FONT 
face="Courier New" size=1>) - <FONT face="Courier New" 
color=#ff00ff size=1>0.0962 * 
Smooth( i - <FONT face="Courier New" color=#ff00ff 
size=1>6 ) ) * factor )
Q1( i ) = ( ( <FONT face="Courier New" color=#ff00ff 
size=1>0.0962 *Detrender( i ) + 
0.5769<FONT 
face="Courier New" size=1> * Detrender( i - <FONT 
face="Courier New" color=#ff00ff size=1>2<FONT face="Courier New" 
size=1> ) _
- <FONT face="Courier New" color=#ff00ff 
size=1>0.5769 * Detrender( i - 
4<FONT 
face="Courier New" size=1>) - <FONT face="Courier New" 
color=#ff00ff size=1>0.0962 * 
Detrender( i - <FONT face="Courier New" color=#ff00ff 
size=1>6 ) ) * factor )
I1( i ) = Detrender( i - <FONT face="Courier New" 
color=#ff00ff size=1>3 )
jl( i ) = ( ( <FONT face="Courier New" color=#ff00ff 
size=1>0.0962 *I1( i )+ 
0.5769<FONT 
face="Courier New" size=1> * I1( i - <FONT face="Courier New" 
color=#ff00ff size=1>2 ) _
- <FONT face="Courier New" color=#ff00ff 
size=1>0.5769 * I1( i - 
4<FONT 
face="Courier New" size=1>) - <FONT face="Courier New" 
color=#ff00ff size=1>0.0962 * I1( 
i - 6<FONT 
face="Courier New" size=1> ) ) * factor )
jQ( i ) = ( ( <FONT face="Courier New" color=#ff00ff 
size=1>0.0962 *Q1( i )+ 
0.5769<FONT 
face="Courier New" size=1> * Q1( i - <FONT face="Courier New" 
color=#ff00ff size=1>2 ) _
- <FONT face="Courier New" color=#ff00ff 
size=1>0.5769 * Q1( i - 
4<FONT 
face="Courier New" size=1>) - <FONT face="Courier New" 
color=#ff00ff size=1>0.0962 * Q1( 
i - 6<FONT 
face="Courier New" size=1> ) ) * factor )
II2( i ) = I1( i ) - jQ( i )
Q2( i ) = Q1( i ) + jl( i )
II2( i ) = <FONT face="Courier New" color=#ff00ff 
size=1>0.2 * II2( i ) + 
0.8<FONT 
face="Courier New" size=1> * II2( i - <FONT face="Courier New" 
color=#ff00ff size=1>1 )
Q2( i ) = <FONT face="Courier New" color=#ff00ff 
size=1>0.2 * Q2( i ) + 
0.8<FONT 
face="Courier New" size=1> * Q2( i - <FONT face="Courier New" 
color=#ff00ff size=1>1 )
Re( i ) = II2( i ) * II2( i - <FONT face="Courier New" 
color=#ff00ff size=1>1 ) + Q2( i 
) * Q2( i - <FONT face="Courier New" color=#ff00ff 
size=1>1 )
Im( i ) = II2( i ) * Q2( i - <FONT face="Courier New" 
color=#ff00ff size=1>1 ) - Q2( i 
) * II2( i - <FONT face="Courier New" color=#ff00ff 
size=1>1 )
Re( i ) = <FONT face="Courier New" color=#ff00ff 
size=1>0.2 * Re( i ) + 
0.8<FONT 
face="Courier New" size=1> * Re( i - <FONT face="Courier New" 
color=#ff00ff size=1>1 )
Im( i ) = <FONT face="Courier New" color=#ff00ff 
size=1>0.2 * Im( i ) + 
0.8<FONT 
face="Courier New" size=1> * Im( i - <FONT face="Courier New" 
color=#ff00ff size=1>1 )

Period( i ) = Period( i - <FONT face="Courier New" 
color=#ff00ff size=1>1) 
if ( Im( i ) <> <FONT face="Courier New" color=#ff00ff 
size=1>0 ) AND ( Re( i ) 
<> <FONT face="Courier New" color=#ff00ff 
size=1>0 ) Then 
Period( i ) = (<FONT face="Courier New" color=#ff00ff 
size=1>2 * PI) / atn( Im( i ) / 
Re( i ) )
End If

if( Period( i ) > <FONT face="Courier New" color=#ff00ff 
size=1>1.5 * Period( i- 
1<FONT 
face="Courier New" size=1> ) ) Then Period( i ) = <FONT 
face="Courier New" color=#ff00ff size=1>1.5<FONT 
face="Courier New" size=1> * Period( i - <FONT face="Courier New" 
color=#ff00ff size=1>1 )
if( Period( i ) < <FONT face="Courier New" color=#ff00ff 
size=1>0.67 * Period( i - 
1<FONT 
face="Courier New" size=1> ) ) Then Period( i ) = <FONT 
face="Courier New" color=#ff00ff size=1>0.67<FONT 
face="Courier New" size=1> * Period( i - <FONT face="Courier New" 
color=#ff00ff size=1>1 )
if( Period( i ) < <FONT face="Courier New" color=#ff00ff 
size=1>6 ) Then Period( i ) = 
6<FONT 
face="Courier New" size=1>
if( Period( i ) > <FONT face="Courier New" color=#ff00ff 
size=1>50 ) Then Period( i ) = 
50<FONT 
face="Courier New" size=1>
Period( i ) = <FONT face="Courier New" color=#ff00ff 
size=1>0.2 * Period( i) + 
0.8<FONT 
face="Courier New" size=1> * Period( i - <FONT face="Courier New" 
color=#ff00ff size=1>1 )

if( I1( i ) <> <FONT face="Courier New" color=#ff00ff 
size=1>0 ) Then Phase(i ) = 
(180<FONT 
face="Courier New" size=1>/PI) * atn( Q1( i )/ I1( i ) )

DeltaPhase( i ) = Phase( i - <FONT face="Courier New" 
color=#ff00ff size=1>1 ) - Phase( 
i )

if( DeltaPhase( i ) < <FONT face="Courier New" 
color=#ff00ff size=1>1 ) Then 
DeltaPhase( i ) = <FONT face="Courier New" color=#ff00ff 
size=1>1
End If

Next 
AFL(<FONT face="Courier New" color=#ff00ff 
size=1>"DeltaPhase") = 
DeltaPhase
%>
DeltaPhase = DeltaPhase;
alpha = FastLimit/DeltaPhase;
alpha = <FONT face="Courier New" color=#0000ff 
size=1>Min( alpha, FastLimit ); 
// not more than 
fast limit
alpha = <FONT face="Courier New" color=#0000ff 
size=1>Max( alpha, SlowLimit ); 
// not less than 
slow limit
MAMA = <FONT face="Courier New" color=#0000ff 
size=1>AMA( Price, alpha );
FAMA = <FONT face="Courier New" color=#0000ff 
size=1>AMA( MAMA, <FONT 
face="Courier New" color=#ff00ff size=1>0.5<FONT 
face="Courier New" size=1> * alpha );
Graph0 = MAMA;
Graph1 = FAMA;
Graph2 = Close;
Graph2Style = <FONT face="Courier New" color=#ff00ff 
size=1>64;
Best regards,Tomasz 
Janeczkoamibroker.com
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
Nurudin 
Kaba 
To: <A 
title=amibroker@xxxxxxxxxxxxxxx 
href="">amibroker@xxxxxx 

Sent: Sunday, July 28, 2002 12:36 
AM
Subject: RE: [amibroker] //MAMA 
& FAMA from ehlers.dll in new AB

<FONT face=Arial color=#0000ff 
size=2>I'm using Yahoo data...see the attached

<FONT face=Tahoma 
size=2>-----Original Message-----From: Stefan Bondorowicz 
[mailto:stefan@xxxx]Sent: Saturday, July 27, 
2002 12:24 PMTo: <A 
href="">amibroker@xxxxxxxxSubject: 
RE: [amibroker] //MAMA & FAMA from ehlers.dll in new 
AB
<SPAN 
class=584322319-27072002>With QuickAFL disabled I have just 
displayed BDH correctly from my TC2000 database.
<SPAN 
class=584322319-27072002> 
<SPAN 
class=584322319-27072002>Stefan

<FONT 
face=Tahoma size=2>-----Original Message-----From: 
Nurudin Kaba [mailto:n.kaba@xxxx]Sent: 27 July 
2002 23:19To: 
amibroker@xxxxxxxxxxxxxxxSubject: RE: [amibroker] 
//MAMA & FAMA from ehlers.dll in new AB
<FONT face=Arial color=#0000ff 
size=2>It still has problems displaying the chart and the MAMA and 
FAMA lines for Exchange Traded Fund "BDH" and others...I'm using 
AB 4.07.3
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>Thanks

<FONT 
face=Tahoma size=2>-----Original Message-----From: 
Stefan Bondorowicz 
[mailto:stefan@xxxx]Sent: Saturday,July 
27, 2002 12:03 PMTo: 
amibroker@xxxxxxxxxxxxxxxSubject: RE: [amibroker] 
//MAMA & FAMA from ehlers.dll in new AB
<SPAN 
class=406390119-27072002>Hi
<SPAN 
class=406390119-27072002> 
<SPAN 
class=406390119-27072002>I have just had a look at it.  
Make sure that you have Level 0 and middle set in indicator 
settings.  Also it looks as if you will have to deselect 
QuickAFL as with this enabled when moving between symbols the 
Level 0 seems to be lost.
<SPAN 
class=406390119-27072002> 
<SPAN 
class=406390119-27072002>Stefan

<FONT 
face=Tahoma size=2>-----Original Message-----From: 
Nurudin Kaba [mailto:n.kaba@xxxx]Sent: 27 
July 2002 22:33To: 
amibroker@xxxxxxxxxxxxxxxSubject: RE: [amibroker] 
//MAMA & FAMA from ehlers.dll in new 
AB
<FONT face=Arial 
color=#0000ff size=2>the elders.dll posted by ...there is a 
sample in the readme file...it works on some symbols but not 
others...

<FONT 
face=Tahoma size=2>-----Original 
Message-----From: Tomasz Janeczko 
[mailto:amibroker@xxxx]Sent: Saturday, July 27, 
2002 12:30 AMTo: 
amibroker@xxxxxxxxxxxxxxxSubject: Re: [amibroker] 
//MAMA & FAMA from ehlers.dll in new 
AB
Hello,
 
What formula are you using?
Try adding SetBarsRequired( 1000, 0); to 
your formula
Best regards,Tomasz 
Janeczkoamibroker.com
<BLOCKQUOTE 
>
----- Original Message ----- 

<DIV 
>From: 
<A title=n.kaba@xxxx 
href="">Nurudin Kaba 
To: <A 
title=amibroker@xxxxxxxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxxxxx 

Sent: Saturday, July 
27, 2002 6:39 AM
Subject: RE: 
[amibroker] //MAMA & FAMA from ehlers.dll in new 
AB

<FONT face=Arial 
color=#0000ff size=2>Yup...but it does work on other 
stocks...just some will give you what you 
experienced...try other stocks...

<FONT 
face=Tahoma size=2>-----Original 
Message-----From: nkis22 
[mailto:nkishor@xxxx]Sent: Friday,July 
26, 2002 4:41 PMTo: <A 
href="">amibroker@xxxxxxxxxxxxxxxSubject: 
[amibroker] //MAMA & FAMA from ehlers.dll in new 
ABIn the most recent release of 
AB, my MAMA & FAMA fromehlers.dll don't work. 
There is no error but the chart looks"hung highin 
the ceiling"Any one else with the same 
problem?nandYour use of 
Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of 
Service. Youruse of 
Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of 
Service. Your use of 
Yahoo! Groups is subject to the <A 
href="">Yahoo! Termsof 
Service. Your useof 
Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of 
Service. Your use of 
Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of 
Service. Your use of Yahoo! 
Groups is subject to the <A 
href="">Yahoo! Terms of 
Service. Your use of Yahoo! 
Groups is subject to the <A 
href="">Yahoo! Terms of 
Service. Your use of Yahoo! 
Groups is subject to the <A 
href="">Yahoo! Terms of 
Service. Your use of Yahoo!Groups 
is subject to the Yahoo! 
Terms of Service. Your use ofYahoo! 
Groups is subject to the <A 
href="">Yahoo! Terms of Service. 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service. 
Your 
use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.