LRMA

Category: Indicators By: Nicolas Created: September 4, 2019, 8:38 AM
September 4, 2019, 8:38 AM
Indicators
0 Comments

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.

//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

 

 

Download
Filename: PRC_LRMA.itf
Downloads: 204
Nicolas Master
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

Logo Logo
Loading...