Design Your Own™
Ensign Windows has a powerful feature for designing your own
studies. Use this feature to implement the logic for a study, or
create special visual effects. There are hundreds of operations
available divided into 16 categories. Use the drop down boxes on the form to
select an operation to implement a study's mathematics or logic. Several
examples are illustrated on this page. Please read the information
about Global Variables.
Adaptive Average
This example implements an Adaptive Average which self adjusts to the
momentum of the market. The example implements this formula:
- Sum = Summation( Abs( Net ), period )
- Factor = ( Abs( Momentum( Last, period ) ) / Sum * 0.6022 ) + 0.0645
- AdaptiveAve = ExponentialAverage( Last, Power( Factor, 2 ))

Line A returns the Absolute of the Net. Line B
calculates the Summation of those Nets and stores the result in [2]. Line
C returns the Bar Close values. Line D calculates the 5 period Momentum of the
close, and stores in [1]. Line E, F and G
implement the formula: ( Abs( Momentum( Last, period ) ) / Sum * 0.6022 )
+ 0.0645 Line H stores the number 2 in Global Variable [2].
This value is the 2nd parameter of the Power function on Line I. Line I
calculates the formula: Power( Factor, 2 ) The
Factor was stored in [1] by Line G. Line J plots the Exponential
Average of the Close using the adaptive parameter stored by Line I in [1]. The
AdaptiveAverage template for this example can be downloaded from the Ensign web
site using Internet Services.
|