TMAGi

Category: Indicators By: Nicolas Created: October 5, 2018, 9:00 AM
October 5, 2018, 9:00 AM
Indicators
0 Comments

TMAGi is an oscillator based on three moving averages and the +DI and -DI lines of the ADX indicator. It indicates the market state: uptrend/downtrend/flat.

Configurable parameters:

  • Fast MA period – fast MA calculation period
  • Middle MA period – middle MA calculation price
  • Slow MA period – slow MA calculation price
  • SMA slowing – SMA smoothing period
  • LWMA slowing – LWMA smoothing period
//PRC_TMAGi | indicator
//05.10.2018
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
//converted from MT4 version

// --- settings
FastMA=8
MidMA=16
SlowMA=25
SlowingSMA=3
SlowingLWMA=8
// --- end of settings

ma1=average[FastMA]
ma2=average[MidMA]
ma3=average[SlowMA]
Buf = Abs(ma1-ma2)+Abs(ma2-ma3)+Abs(ma1-ma3)
idi=DIplus[14](high)-DIminus[14](low)
Buf = Buf * (idi/pointsize)

SG = average[SlowingSMA](Buf)
BS = WeightedAverage[SlowingLWMA](Buf)

return SG coloured(30,144,255) style(dottedline,3), BS coloured(220,20,60) style(line,3), 0 coloured(169,169,169) style(dottedline)

 

Download
Filename: PRC_TMAGi.itf
Downloads: 165
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...