|
Finds the cross over of two series.
Syntax
CrossOver( series1, series2, [direction], [crossOverSize], [offset] )
Parameters
series1
|
|
series1
|
series2
|
|
series2
|
direction
|
|
the direction of the cross over. A positive number looks for when series1 goes from below series2 to above series2. A negative number looks for when series1 goes from above series2 to below series2. The default is 1.
|
crossOverSize
|
|
the number of bars to consider when looking for the cross. Default value is 1 bars which will check if the cross occured between the last bar and the current bar.
|
offset
|
|
the number of bars to offset before finding the value. The default is to look at the current bar.
|
|
|
|
returns
|
|
TRUE if there was a cross over, FALSE if not.
|
Example
' Check if there was a cross over between the short moving average and the long moving average.
IF CrossOver( shortMovingAverage, longMovingAverage ) THEN
PRINT "Yes, there was a cross over today."
ENDIF
|