dotnetCHARTING Send comments on this topic.
DMISignal(Series,Int32,Int32) Method
See Also 
dotnetCHARTING Namespace > FinancialEngine Class > DMISignal Method : DMISignal(Series,Int32,Int32) Method


s
A financial series where the first element contain the prices of last trading period, the second element represents the prices of the previous periods and so on. Please note that in order to calculate this indicator the elements of the financial series must contain High, Low and Close values.
method
Determines the methods used for the evaluation of the moving average in accordance with the following key:
  1. 1 = Simple moving average
  2. 2 = Geometric moving average
  3. 3 = Linearly weighted moving average
  4. 4 = Exponentially Weighted Moving average within smoothing fact set to be 0.5.

For further details concerning the definition of these moving averages please see the accompanying PDF documentation or the API documentation for SimpleMovingAverage.

lengthOfMA
The number of periods over which the moving average is considered.
Evaluates what is know as the Directional Motion Indicator (MDI) Trading Signal.

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Function DMISignal( _
   ByVal s As Series, _
   ByVal method As Integer, _
   ByVal lengthOfMA As Integer _
) As Series
Visual Basic (Usage)Copy Code
Dim s As Series
Dim method As Integer
Dim lengthOfMA As Integer
Dim value As Series
 
value = FinancialEngine.DMISignal(s, method, lengthOfMA)
C# 
public static Series DMISignal( 
   Series s,
   int method,
   int lengthOfMA
)

Parameters

s
A financial series where the first element contain the prices of last trading period, the second element represents the prices of the previous periods and so on. Please note that in order to calculate this indicator the elements of the financial series must contain High, Low and Close values.
method
Determines the methods used for the evaluation of the moving average in accordance with the following key:
  1. 1 = Simple moving average
  2. 2 = Geometric moving average
  3. 3 = Linearly weighted moving average
  4. 4 = Exponentially Weighted Moving average within smoothing fact set to be 0.5.

For further details concerning the definition of these moving averages please see the accompanying PDF documentation or the API documentation for SimpleMovingAverage.

lengthOfMA
The number of periods over which the moving average is considered.

Return Value

Returns -1, 0, or 1 respectively according to whether a sell, no action or buy signal is generated.

Remarks

This signal determines whether a given asset or index should be sold, brought or no action should be taken for a given asset under consideration. This trading signal forms the basis of the DMI Trading System which was developed by Welles Wilder.

At its simplest level to DMI system states that when the PDI crosses above the MDI a buy signal is generated and when the MDI crosses above the PMI then a sell signal is generated. This however may generate an excessive number of signals and hence we offer the possibility to smooth out these indicators according to a moving average which will help to reduce to sensitivity of the trading system.

Advantages to this Approach

This trading approach will reveal a trend before it is detected by most market participants. Once the trend becomes more widely recognized other market participants will tend to buy the tend and hence re-enforcing the trend dynamics. Hence the DMI system offers a good risk/reward trend following system.

See Also

© 2010 All Rights Reserved.