U Trend Sensor

Category: Indicators By: Nicolas Created: October 29, 2015, 10:44 PM
October 29, 2015, 10:44 PM
Indicators
4 Comments

The U Trend Sensor oscillator is derived from the step percent variation of 2 different types of triangular moving average. When the oscillator return values over the zero level, a bullish trend is occuring, while a bearish one occurs when the oscillator navigate below this level.

Because of treshold of variations are inherit from percentage of price movement, this parameters must be adapted to the instrument and the timeframe where the indicator is attached.

Trades signals can also be taken more agressivly by crossing of the signal line and the UTS one. Signal line can be desactivated into parameters.

Parameters (example on DAX 2h timeframe)

  • periodf = 50
  • periods = 200
  • fpercent = 1
  • spercent = 0.5
  • p = 10
  • psignal = 20
    once fss = close
    once sss = close
    
    fMA = TriangularAverage[periodf](close)
    sMA = TriangularAverage[periods](close)
    
    if(fMA > fss + (fMA/100)*fpercent) THEN
      fss = fMA
    ELSIF (fMA < fss - (fMA/100)*fpercent) THEN
      fss = fMA
    ELSE
      fss = fss
    ENDIF
    
    if(sMA > sss + (sMA/100)*spercent) THEN
      sss = sMA
    ELSIF (sMA < sss - (sMA/100)*spercent) THEN
      sss = sMA
    ELSE
      sss = sss
    ENDIF
    
    U = fss - sss
    UMM = exponentialaverage[p](U)
    
    if(plotsignal) THEN
      signal = average[psignal](UMM)
    ENDIF
    
    RETURN UMM as "U Trend Sensor", signal as "signal", 0 as "zero level"

Download
Filename: U-Trend-Sensor.itf
Downloads: 210
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...