Gamestudio Links
Zorro Links
Newest Posts
SGT_FW
by Aku_Aku. 11/30/26 08:19
Removing outliers from files
by JeyKey II. 11/29/26 10:01
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (AndrewAMD), 5,875 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
FisherN #487412
04/11/23 08:36
04/11/23 08:36
Joined: Apr 2023
Posts: 19
R
rki Offline OP
Newbie
rki  Offline OP
Newbie
R

Joined: Apr 2023
Posts: 19
Here is my Python implementaton of FisherN

def FisherN (Data, Len):
out=np.ones (len(Data))*Data
Value1=0
Fish=0
for i in range (len(out)):
Period = i+Len
Period = Period if Period < len(out) else len(out)
MaxH=max (Data[i:i+Len])
MinL=min (Data[i:i+Len])
if MaxH>MinL:
fish=2.0*(Data[i]-MinL)/(MaxH-MinL)-1
else:
fish=0
Value1=0.33*2*(fish-0.5)+0.67*Value1
if Value1 > 0.999:
Value1=0.999
if Value1 <-0.999:
Value1=-0.999
Fish=0.5*Fish+0.5*np.log((1+Value1)/(1-Value1))
out[i]=Fish
return out


This was the corresponding implementation in Zorro

// normalize a value to the -1..+1 range
var Normalize(var* Data,int Period)
{
Period = Max(2,Period);
var vMin = MinVal(Data,Period);
var vMax = MaxVal(Data,Period);
if(vMax>vMin)
return 2.*(*Data-vMin)/(vMax-vMin) - 1.;
else return 0.;
}

// Fisher Transform
var Fisher(var* Data)
{
var v = Clamp(Data[0],-0.998,0.998);
return 0.5*log((1.+v)/(1.-v));
}

// Normalized Fisher transform
var FisherN(var* Data,int Period)
{
var *Value = series(*Data,2), *FN = series(*Data,2);
Value[0] = 0.33*Normalize(Data,Period) + 0.67*Value[1];
return FN[0] = Fisher(Value) + 0.5*FN[1];
}

Re: FisherN [Re: rki] #487413
04/11/23 08:38
04/11/23 08:38
Joined: Apr 2023
Posts: 19
R
rki Offline OP
Newbie
rki  Offline OP
Newbie
R

Joined: Apr 2023
Posts: 19
My questions are:
1. Do you agree that the implementation is right as Zorro/meaning same as Zorro
2.
Why do we normalize as 2*(x-xmin)/(xmax-xmin)-1 instead of just (x-xmean)/sigma . I see that the results vary due to this.

Last edited by rki; 04/11/23 08:41.

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1