This indicator is calculated the following way:
LRMA[ = 3.0 * LWMA(Price) – 2.0 * SMA(Price)
where:
- LWMA – linearly weighted smoothing
- SMA – simple smoothing
- PRICE – price series value
All calculation are made on the current bar and with the current price value.
This indicator clearly shows market trends dividing a price chart into two sectors. If a price is above the indicator line, the trend is going upwards. If a price is below the indicator line, the trend is going downwards.
Converted from MT5 following a request made in our ProRealTime indicators’forum section.
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 |
//PRC_LRMA | indicator //04.09.2019 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge //converted from MT5 code version // --- settings period=14 // --- end of settings price=customclose if barindex>period then tmpS=0 tmpW=0 wsum=0 for i=0 to period-1 do tmpS=tmpS+price[i] tmpW=tmpW+(price[i]*(period-i)) wsum=wsum+(period-i) next tmpS=tmpS/period tmpW=tmpW/wsum Res=3.0*tmpW-2.0*tmpS endif return res |
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