Technical Analysis - Cross Any vs Cross Over functions

By xngo on April 3, 2019

In technical analysis, CrossAny and CrossOver math functions are usually provided but the distinction between these 2 functions are not always explicitly specified in the documentations.

For the CrossAny function, it returns true when either point A or B crosses each other from t-1 to t. Whereas, for the CrossOver function, it returns true only when point A crosses over point B.

Here is an example.

Date       | A | B | CrossAny | CrossOver |
2019-04-01 | 3 | 4 | n/a      | n/a       | 
2019-04-02 | 8 | 5 | True     | True      | 
2019-04-03 | 6 | 7 | True     | False     | 

TA - Cross Any chart TA - Cross Over chart

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.