Skip to content
Algo Trade Analytics Docs

matrix.is_symmetric() - Pine Script Function

The function determines if a square matrix is symmetric (elements are symmetric with respect to the main diagonal).

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

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

  • Returns false with non-square matrices.