evm_sign
Scalar function
Returns the sign of an INT256 value: -1 for negative, 0 for zero, 1 for positive. Useful for direction detection in price changes and deltas.
Overloads
evm_sign(INT256)
Parameters
| Name | Type |
|---|---|
| x | INT256 |
Returns
| Name | Type |
|---|---|
| sign | BIGINT |
1
SELECT evm_sign(price_delta::INT256) AS direction;
Notebook ready in readonly mode.