Announcement

Collapse
No announcement yet.

Cross Over/Under

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cross Over/Under

    Is there a cross over/under function that will return true if a cross over/under has occurred within the last X number of bars?

    For instance, there are times when I have MA's that are crossing, but do it at such a slow rate that simply checking if (prevA < prevB & curA > cur B) as there may be bars when they are equal.

    If not, is there an easy way to code for such a CrossAbove / CrossBelow function?

    I.E. var X = CrossAbove(MA10,MA20,5); where if the cross took place within the last five bars we would return true.
Working...
X