PureBytes Links
Trading Reference Links
|
Here's an older jscript version of Fisher. Is this what you're
looking for?
dale b
/*Fisher Transformation
TAS&C, Novermber,2002, p. 40*/
price=(H+L)/2;
Length=Optimize("length",3,1,50,1);
MaxH=HHV(price,Length);
MinL=LLV(price,Length);
EnableScript("jscript");
<%
MaxH=VBArray(AFL("MaxH")).toArray();
MinL=VBArray(AFL("MinL")).toArray();
price=VBArray(AFL("Price")).toArray();
//Create new array and initialize
Value1= new Array();
Fish=new Array();
Value1[0]=0;
Fish[0]=0;
//compute values
for (i=1;i<price.length;i++) {
Value1[i]=0.33*2*((price[i]-MinL[i])/(MaxH[i]-MinL[i])-0.5)
+0.67*Value1[i-1];
if (Value1[i]>0.99) {
Value1[i]=0.999;
}
if (Value1[i]<-0.99) {
Value1[i]=-0.99;
}
Fish[i]=0.5*Math.log((1+Value1[i])/(1-Value1[i]))+0.5*Fish[i-1];
}
AFL("Fish")=Fish;
%>//End of JScrip
Trigger=Ref(Fish,Optimize("Lookback",-1,-20,-1,1));
FishROC=MA(100*(C-Ref(C,-1))/Ref(C,-1),5);
//Buy=Cross(fishROC,fish);
//Sell=Cross(Fish,FishROC);
Buycond1=Cross(Fish,Trigger);
SellCond1=Cross(Trigger,Fish);
SellCond2=BarsSince(BuyCond1)>4;//Optimize("days since Buy",4,1,20,1);
BuyCond2=BarsSince(SellCond1)>4;//Optimize("Days since
Sell",4,5,20,1);
Buy=BuyCond1;// AND BuyCond2;
Sell=SellCond1;// AND SellCond2;
Cover=Buy;
Short=Sell;
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
Cover=ExRem(Cover,Short);
Short=ExRem(Short,Cover);
Plot(Fish,"Fisher Transformation",4,1);
Plot(Ref(Fish,-1),"Trigger",5,1);
Plot(FishROC,"ROC",6,1);
--- In amibroker@xxxxxxxxxxxxxxx, "Steve Almond" <steve2@xxxx> wrote:
> Johan,
>
> The multiplier will make no difference to the shape of the curve.
Here is what my chart looks like. Notice the strange 'spikey' nature
of the ROC curve:
>
>
>
> Steve
>
>
>
> ----- Original Message -----
> From: "johsun" <johanskatt@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Friday, April 02, 2004 1:40 PM
> Subject: [amibroker] Re: Fisher Question - TJ?
>
>
> > It says in the doc that he amplifies the roc by a factor ten,
> >
> > plot(10*ROC(Fish,1),"ROC",1,1);
> >
> > Regards
> > Johan
> >
> >
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Steve Almond" <steve2@xxxx>
wrote:
> > > This AFL (below) provides the first two curves of the Fisher
> > Transform.
> > > According to John Ehlers we should also look at the ROC
of 'fish'.
> > See here:
> > >
> > > http://www.mesasoftware.com/Fisher.doc
> > >
> > > When I try to do this using:
> > >
> > > plot(ROC(Fish,1),"ROC",1,1);
> > >
> > > I get a strange line, not at all like Ehlers'.
> > >
> > > Here is the metastock version:
> > >
> > > http://www.equis.com/Support/TASCArticles/ViewArticle.aspx?Id=37
> > >
> > > Can anyone help me sort my ROC?
> > >
> > > Steve
> > >
> > >
> > > ----- Original Message -----
> > > From: "Tomasz Janeczko" <amibroker@xxxx>
> > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > Sent: Wednesday, March 24, 2004 12:50 AM
> > > Subject: Re: [amibroker] TRANSLATION OF AN EASY LANGUAGE FORMULA
> > >
> > >
> > > > Hello,
> > > >
> > > > Translated code:
> > > >
> > > > Price= ((H+L)/2);
> > > > Len=10;
> > > >
> > > > MaxH=HHV(Price,Len);
> > > > MinL=LLV(Price,Len);
> > > > Value1=AMA( 2*((Price-MinL)/(MaxH-MinL)-.5), 0.5 );
> > > > Value1 = Min( Value1, 0.9999 );
> > > > Value1 = Max( Value1, -0.9999 );
> > > > Fish= AMA2( 0.25*log((1+Value1)/(1-Value1)), 1, 0.5 );
> > > >
> > > > Plot(Fish, "Fisher", colorRed);
> > > > Plot( Ref(Fish,-1), "Trigger",colorBlue);
> > > >
> > > >
> > > > Best regards,
> > > > Tomasz Janeczko
> > > > amibroker.com
> > > > ----- Original Message -----
> > > > From: "renilange" <reni.lange@xxxx>
> > > > To: <amibroker@xxxxxxxxxxxxxxx>
> > > > Sent: Wednesday, March 24, 2004 12:25 AM
> > > > Subject: [amibroker] TRANSLATION OF AN EASY LANGUAGE FORMULA
> > > >
> > > >
> > > > > Could somebody translate this ELA formula in AFL??
> > > > > It is a really great indicator,called Fisher Transform, I
saw it
> > > > > work by a friend of mine using Tradestation.
> > > > > It is really worth to translate it!
> > > > >
> > > > > Thxs. Reni
> > > > >
> > > > > Inputs: Price((H+L)/2),
> > > > > Len(10);
> > > > >
> > > > > Vars: MaxH(0),
> > > > > MinL(0),
> > > > > Fish(0);
> > > > > MaxH=Highest(Price,Len);
> > > > > MinL=Lowest(Price,Len);
> > > > > Value1=.5*2*((Price-MinL)/(MaxH-MinL)-.5)
> > > > > + .5*Value1[1];
> > > > > If Value1> .9999 then Value1 = .9999;
> > > > > If Value1< .9999 then Value1 = -.9999;
> > > > > Fish= 0.25*Log((1+Value1)/(1-Value1)) + 5* Fish[1];
> > > > >
> > > > > Plot1 (Fish, "Fisher");
> > > > > Plot2(Fish[1], "Trigger");
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Send BUG REPORTS to bugs@xxxx
> > > > > Send SUGGESTIONS to suggest@xxxx
> > > > > -----------------------------------------
> > > > > 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 Links
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > Send BUG REPORTS to bugs@xxxx
> > > > Send SUGGESTIONS to suggest@xxxx
> > > > -----------------------------------------
> > > > 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 Links
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> >
> >
> >
> > Send BUG REPORTS to bugs@xxxx
> > Send SUGGESTIONS to suggest@xxxx
> > -----------------------------------------
> > 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 Links
> >
> >
> >
> >
> >
> >
> >
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
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 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:
http://docs.yahoo.com/info/terms/
|