lolo

Fisher Transform

Category: Indicators By: lolo Created: October 12, 2015, 8:27 PM
October 12, 2015, 8:27 PM
Indicators
15 Comments
Fisher Transform

The Fisher Transform attempts to be a major turning point indicator.

Parameters

Length (Len = 13)

O/B (a = 5)

O/S (b = -5)

IF BARINDEX < len THEN
     
     value1 = 0
     fish = 0
     
ELSE
     
     MaxH = Highest[len](MEDIANPRICE)
     MinL = Lowest[len](MEDIANPRICE)
     Value1 = ( (MEDIANPRICE - MinL)/(MaxH - MinL) - .5) + .67 * Value1
     
     If Value1 > .99 then
          Value1 = .999
     ENDIF
     
     If Value1 < -.99 then
          Value1 = -.999
     ENDIF
     
     Fish = 0.5*Log((1 + Value1)/(1 - Value1)) + .5 * Fish
     Trigger=fish[1]
     
     a=5
     b=-5
     
ENDIF

RETURN Fish,Trigger,a,b

Download
Filename: Fisher-Transform.itf
Downloads: 315
lolo
lolo Average
I usually let my code do the talking, which explains why my bio is as empty as a newly created file. Bio to be initialized...
Author’s Profile

Comments

Derek
4 years ago
#

You are right, There is something odd with this line of code. It should be A = B + n * A[1]. So, there are two things missing in line 10. Ps. Sorry for the late reply

Coldtrade
5 years ago
#

Hello. I'm new to programming and don't understand the algebraic meaning of the formula: Value1 = (.66 * ((MEDIANPRICE - MinL) / (MaxH - MinL) - .5)) + .67 * Value1 Isn't that like saying A = B + n * A? Something substantial escapes me, thanks to those who want to help me.

Derek
5 years ago
#

In line 10 there is a value missing for the calculation. You can cross check it here on page 4: https://www.mesasoftware.com/papers/UsingTheFisherTransform.pdf Line 10 should be: Value1 = (.66* ((MEDIANPRICE - MinL)/(MaxH - MinL) - .5)) + .67 * Value1

SB-FO
6 years ago
#

Found my mistake, should have been Trigger = Average[4](Fish)

SB-FO
6 years ago
#

Nicolas, sorry to bother you again. In trying to turn this indicator into a strategy in PRT I am doing something wrong. I had assumed Len is Length of Fish. When i back best in PRT, it does not make a trade, or no second trade. Can you PLEASE advise? I have copies the code below. DEFPARAM CumulateOrders = True // Cumulating positions activated capital = 100000 + strategyprofit Equity = capital / close myCurrentProfit = STRATEGYPROFIT Len = 9 IF BARINDEX .99 then Value1 = .999 ENDIF If Value1 < -.99 then Value1 = -.999 ENDIF Fish = 0.5*Log((1 + Value1)/(1 - Value1)) + .5 * Fish Trigger = Average[4](close)

SB-FO
6 years ago
#

Ah ha. So FISH - 1 so to speak. I would have thought that would have been coded as [-1]. I have played with a SMA of 4 for the trigger on D charts and it seems nicely profitable. When I back-test standard it losses money. Hence why i was trying to figure it out. I need to back-test 4H time frames. Thank you for your help. Stuart

SB-FO
6 years ago
#

Nicolas, on the Trigger formula, Trigger=fish[1] , is that mean it is using linear / moving linear regression of 1 of Fish, or something else? I don't understand what the [1] mean /do. Fish = 0.5*Log((1 + Value1)/(1 - Value1)) + .5 * Fish Thank you for the help understanding this. Trigger=fish[1]

Nicolas
6 years ago
#

Trigger is just the value of fish of the previous bar, the blue line.

SB-FO
6 years ago
#

Good to know and thank you. Oh, on this indicator, how do I change the range from 5/-5 to 1/-1?

SB-FO
6 years ago
#

Thanks Nicolas. While I understand I can use either Median or Typical (Price), the question was which is correct or perhaps better to use?

Nicolas
6 years ago
#

I don't know. MedianPrice (exact mid price of the candlestick) tends to be smoother than TypicalPrice.

SB-FO
6 years ago
#

Question for Nicolas or others. Should the Fisher Transformer price / bar be based on MEDIANPRICE as above, or Typically Price? Thanks for your help, Stuart

Nicolas
6 years ago
#

Use the data serie you want. Replace MEDIANPRICE by TYPICALPRICE in the above code.

iioixi
7 years ago
#

Value1 = ( (MEDIANPRICE - MinL)/(MaxH - MinL) - .5) + .67 * Value1 Please explain the meaning of this line formula. Why is it different from the original? The original formula is to format the oscillation + - 1 and filter it with equation EMA = alpha * close + (1 - alpha) * EMA[1];

Nicolas
7 years ago
#

FYI, other Fisher related posts: (and with other fisher transform method): https://www.prorealcode.com/tag/fisher/

ProRealCode ProRealCode
Loading...