Skip to content
Algo Trade Analytics Docs

matrix.is_antidiagonal() - Pine Script Function

The function determines if the matrix is anti-diagonal (all elements outside the secondary diagonal are zero).

matrix.is_antidiagonal(id) → series bool
NameTypeDescription
idmatrix<int/float>Matrix object to test.

Returns true if the id matrix is ​​anti-diagonal, false otherwise.

  • Returns false with non-square matrices.