'Declaration Public Overloads Shared Function DMISignal( _ ByVal seriesName As String, _ ByVal s As Series, _ ByVal method As Integer, _ ByVal lengthOfMA As Integer _ ) As Series
'Usage Dim seriesName As String Dim s As Series Dim method As Integer Dim lengthOfMA As Integer Dim value As Series value = FinancialEngine.DMISignal(seriesName, s, method, lengthOfMA)
public static Series DMISignal( string seriesName, Series s, int method, int lengthOfMA )
Parameters
- seriesName
- The name of the series which will be displayed on the chart, i.e. its label.
- 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 = Simple moving average
- 2 = Geometric moving average
- 3 = Linearly weighted moving average
- 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(String,Series,ElementValue,Int32).
- lengthOfMA
- The number of periods over which the moving average is considered.
Return Value
-1
, 0
, or 1
respectively according to whether a sell, no action or buy signal is generated.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.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2