Skip to content
Algo Trade Analytics Docs

matrix.is_binary() - Pine Script Function

The function determines if the matrix is binary (when all elements of the matrix are 0 or 1).

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

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