UNIVERSAL CHANNEL OSCILLATOR

Category: Indicators By: ALE Created: April 22, 2019, 4:10 PM
April 22, 2019, 4:10 PM
Indicators
18 Comments

The Universal indicator by John Ehlers plotted directly on the chart, for an immediate understanding of its state. It has been implemented with the moving average of the oscillator, the overbought and oversold areas, and the colors indicating the direction of the trend. Suitable for any chart and time frame.

Indicator interface

  • OVERBOUGHT = change the level of the Overbough line;
  • OVERSOLD = change the level of the Oversold line;
  • UNIAVG = enables or disables the moving average applied to the value of the Universal oscillator;
  • UNIAVGPERIOD = changes the period of the moving average applied to the Universal oscillator;
  • UNIVERSALPERIOD = changes the oscillator period;
  • UNIVERSALFILTER = change the indicator filter period;
  • TIGHTENCHANNEL = change the channel width;
  • ATRPERIOD = changes the calculation period of the ATR used for the formation of the channel, serves to optimize the channel size;
  • AVERAGEPERIOD = changes the value of the moving average used for the formation of the channel;
  • AVERAGEMETHOD = is used to select the type of moving media used for the formation of the channel.

How it can be used:

  1. As a trend indicator;
  2. For inversion strategies;
  3. As a channel, to identify the range of market movement;
  4. As an entry and exit signal, when the Universal value crosses the level 0, or crosses the overbought and oversold levels, or its moving average;
  5. Within automatic trading strategies, such as entry, exit or as a filter.
//www.automatictrading.it
///////////////////////INDICATOR_UNIVERSAL
maPrice = customclose
bandedge= UniversalPeriod
whitenoise= (maPrice - maPrice[min(UniversalPeriod,UniversalFilter)])/2
if barindex>bandedge then
 a1= Exp(-1.414 * 3.14159 / bandedge)
 b1= 2*a1 * Cos(1.414*180 /bandedge)
 c2= b1
 c3= -a1 * a1
 c1= 1 - c2 - c3
 filt= c1 * (whitenoise + whitenoise[1])/2 + c2*filt[1] + c3*filt[1]

 filt1 = filt

 if ABS(filt1)>pk[1] then
  pk = ABS(filt1)
 else
  pk = 0.991 * pk[1]
 endif

 if pk=0 then
  denom = -1
 else
  denom = pk
 endif

 if denom = -1 then
  result = result[1]
 else
  result = filt1/pk
 endif
endif

///////////////////////////////////////////////////

dTR = 0
for i = 0to ATRperiod-1
 dTR=dTR+max(abs(Dhigh(i)-Dlow(i)),max(abs(Dhigh(i)-Dclose(i+1)),abs(Dlow(i)-Dclose(i+1))))
next
dtr=dtr/MAX(1,TightenChannel)
avgRange = dTR

maValue = average[max(1,AveragePeriod),AverageMethod](maPrice)

ResultValue = RESULT

Buffer1=maValue
Buffer2=maValue+(avgRange*((overBought)))
Buffer3=maValue-(avgRange*( (overSold)))
Buffer4=maValue+(ResultValue)/1*avgRange
Buffer5=maValue+(avgRange*((10/10)))
Buffer6=maValue+(avgRange*((-10/10)))


if UniAvg  then
 UniAvgline=Average[UniAvgPeriod](buffer4)
ELSE
 UniAvgline=UNDEFINED
endif

MyUNI = result
R = 50+(200-MyUNI*400)
G =50+(200+MyUNI*500)

DRAWCANDLE(Buffer2, Buffer3, Buffer2, Buffer3)coloured(R,G,0,40)

return Buffer1 coloured(0,0,0) style(dottedline,1) as "0 level", Buffer2 coloured(0,0,0) style(dottedline,1) as "overbought level", Buffer3 coloured(0,0,0) style(dottedline,1) as "oversold level", Buffer4 coloured(0,130,250) style(LINE,2) as "UNIVERSAL VALUE",Buffer5 AS"1 level",Buffer6 AS"-1 level",UniAvgline coloured(250,150,0) style(dottedline,1) AS" UniversalAverage"

Download
Filename: AT.IT_Universal_Channel_Osc..itf
Downloads: 782
Download
Filename: UNI_INTERFA_2-1024x564.jpeg
Downloads: 294
Download
Filename: interf_3-700x470.jpeg
Downloads: 361
ALE Master
My name is Alessandro, i'm a trader since 2006 You can find me on my website: <a href="http://www.automatictrading.it/" rel="dofollow">www.automatictrading.it</a> <strong>(trading programming services Italy)</strong> Italy
Author’s Profile

Comments

Logo Logo
Loading...