In the IFTA publication, year 2012, the work of Manfred G. Dürschner introduced the moving averages 3.0, which our Roberto Gozzi has excellently translated into code.
Since in the cited publication, there is an example of using the NWMA moving average, within the Aroon oscillator, I tried to repeat the work by making the code for Prorealtime.
In practice, NWMA (89.21, wma type) is used with a 5-period Aroon oscillator. The result is digitized with the inverse Fisher transform, with the result visible in the photo.
Obviously, through the variables, it is possible to change the reference periods and averages for the calculations.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
//Variabili: //periodi(periodi Aroon)[5], //sampled(periodo doppio o più di mycycle)[89], //mycycle(periodo in analisi)[21], //matype(matype)[2] periodi = 5 sampled=89 mycycle=21 matype=2 // oscillatore aroon con trasformata di fisher inversa //Inizio - NWMA calcolo media mobile 3.0 New weighted media average length1 = sampled //ciclo sampled doppio length2 = mycycle //ciclo periodo mediatrezero = matype //https://www.prorealcode.com/documentation/average/ src = CustomClose // lambda = length1 / length2 alpha = lambda * (length1 - 1) / (length1 - lambda ) // ma1 = average [length1 ,matype ](src ) ma2 = average [length2 ,matype ](ma1 ) nma = (1 + alpha ) * ma1 - alpha * ma2 // oscillatore Aroon di NWMA length = periodi upper = 100 * (length -highestBars [length +1](nma ) )/length lower = 100 * (length -lowestbars [length +1](nma ))/length oscaroon =upper - lower //oscillatore Aroon // Trasformata di Fisher inversa (exp(2 * x) - 1) / (exp(2 * x) + 1) fisherinverseosc = (exp (2 * oscaroon ) - 1) / (exp (2 * oscaroon ) + 1) return fisherinverseosc as "IFTAO" , 0 as "linea crossover" |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials