Skip to content
Algo Trade Analytics Docs

matrix.is_triangular() - Pine Script Function

The function determines if the matrix is triangular (if all elements above or below the main diagonal are zero).

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

Returns true if the id matrix is triangular, false otherwise.

  • Returns false with non-square matrices.