Exported using NT Version 7.0.1000.10
Why code another version of the ADXVMA?
All previous versions of the ADXVMA are based on a dirty transcript from MetaTrader which has a number of bugs, inconsistencies or variables that are not being used. This is just an attempt to clean up the mess and come up with a proper version. These are the changes:
Initialization: Most versions are initialized with a value of 0 instead of Input[0], this usually creates false values for the first 100 or 200 bars.
Redundant variables: The transscripts from MetaTrader use 4 different variables for the period, although it is always the same period. A variable used for the shift in MetaTrader is carried around, although it always has the value 0.
Inefficient algorithms: The indicator mostly uses Wilder's smoothing for calculating exponential averages from the positive and negative Momentum. The smoothing constant k is calculated once and applied to the various steps required for smoothing. Searching the highest and lowest value for the last n+1 period was hidden in a complex algorithm.
Input Series: The prior versions can only be applied to the close, this version also accepts other input series, such as the high, low or the typical price of the selected instrument.
Trendfilter: The indicator can best be used as a trendfilter. The trend state, which can be positive, negative and neutral, is exposed via an IntSeries, which can then be accessed by other indicators and strategies. The trend can also be shown via a paintbar option.
Update June 11, 2012: Trendfilter and colors modified to avoid frequent trend changes.
Update July 3, 2012: Serialization of display options changed. This will make it simpler to call the indicator from other indicators or strategies.
Category NinjaTrader 7 Indicators
|
|
|