The Fisher Transform attempts to be a major turning point indicator.
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
You must be logged in to post a comment.
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)
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
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]
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];
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