Implements a general framework for producing trading signals based on the crossing of two Stochastics.
Syntax
Parameters
- s
- An series where the first element is the closing price in the last trading period, the second term is the closing price in the previous trading period and so on.
- noOfPeriods
- An integer which represents the number of periods used over which the closing price is compared.
- 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.
- lengthOfMA
- The number of periods over which the moving average is considered.
Return Value
-1, 0, 1 - this method returns either -1, 0, 1 to indicate that either a sell, no action or buy signal was generated.
Remarks
See Also