Fisher Least Square Moving Average FLSMA
- This topic has 3 replies, 2 voices, and was last updated 2 years ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
Forums › ProRealTime forum Français › Support ProBuilder › Fisher Least Square Moving Average FLSMA
Bonsoir à tous
En faisant des recherches sur l’invers Fisher Transform j’ai trouvé ce code sur trading view.
J’ai bien essayé de le traduire mais il y a des choses qui m’échappent …
Quelqu’un aurait-il la bonté de le faire.
https://www.tradingview.com/script/ZZ1LjoJC-Fisher-Least-Squares-Moving-Average/
Bons trades
1 2 3 4 5 6 7 8 9 10 11 12 13 |
//@version=4 study("Fisher Least Squares Moving Average",shorttitle="FLSMA",overlay=true) length = input(100),src = input(close),n = bar_index //---- b = 0. //---- e = sma(abs(src - nz(b[1])),length) z = sma(src - nz(b[1],src),length)/e r = (exp(2*z) - 1)/(exp(2*z) + 1) a = (n - sma(n,length))/stdev(n,length) * r b := sma(src,length) + a*stdev(src,length) //---- plot(b,title="FLSMA",color=#ff1100,linewidth=2,transp=0) |
Ci-dessous la traduction du code de la Fisher Least Squares Moving Average pour ProRealTime
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
//Fisher Least Squares Moving Average length = 50 src = customclose //---- n = barindex //---- if barindex>length then e = average[length](abs(src - (b[1]))) z = average[length](src-b[1])/e r = (exp(2*z) - 1)/(exp(2*z) + 1) a = (n - average[length](n))/std[length](n) * r b = average[length](src) + a*std[length](src) //---- endif return b as "FLSMA" |