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

Re: [amibroker] Re: IQFeed plugin 1.5.0 works great!



PureBytes Links

Trading Reference Links

Dimitris and others:
Please try the function below, it works at any argument
of "fisher transform"
-dalengo

--8<--------------------------------------------------------
// -- Inverse Fisher transform (regularized) --
/* Inverse Fisher transform of array x is just y=tanh(x).
Make the following regularization to avoid exp overflow
-- dalengo 4/19/04 */
function InvFisherTfm( array )
{
e2y = exp( - 2 * abs(array) );
tanh = sign(array) * ( 1 - e2y )/( 1 + e2y );
return tanh;
}
--8<--------------------------------------------------------
// -- Example --
Plot(InvFisherTfm(MACD()*100),"tanh[100*MACD()]",1,1);

// -- Check that regularized FishT takes arguments like 1000 w/out 
a problem
y0=0;
for(array=44;array<=1000;array=array+1)
 {
 y=InvFisherTfm(array);
 if(Nz(y)!=0)
 y0=array;
 }
 Title="Maximum Accepted Array = "+WriteVal(y0,1.6);
 

--- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" 
<TSOKAKIS@xxxx> wrote:
> --- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" 
<TSOKAKIS@xxxx> 
> wrote:
> > Tomasz,
> > After a more detailed examination, the function InvFisherTfm( 
> array ) 
> > does not work for array>=45 [the exponential becomes >10^40]
> 
> To be more specific, array should be lower than 44.361416 as it 
comes 
> from the elementary
>  function InvFisherTfm( array )
> {
>   e2y = exp( 2 * array );
>   return ( e2y - 1 )/( e2y + 1 );
> }
> y0=0;
> for(array=44;array<45;array=array+0.00001)
> {
> y=InvFisherTfm(array);
> if(Nz(y)!=0)
> y0=array;
> }
> Title="Maximum Accepted Array = "+WriteVal(y0,1.6);
> 
> > Of course, many arrays may be higher than 45...
> > Some initial limitations should be added for regular operation.
> > Dimitris Tsokakis
> > --- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" 
> <TSOKAKIS@xxxx> 
> > wrote:
> > > Tomasz,
> > > I noticed that the ICycle [from Listing 2 of the recent TASC 
> > traders 
> > > tips] has some groups of {empty} values, when applied to an 
> index. 
> > > The rest values are +1 or -1 and are not similar to Fig. 4 red 
> line.
> > > Is it normal?
> > > Dimitris Tsokakis



------------------------ 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/