charting
Open chart
DoveeDocumentation
LanguageFunction reference

Home/Dovee/Function reference

sign

Sign of the value: -1, 0, or 1.

Reference/Math & comparisons/Function

sign(series)

Useful to turn a difference into a direction flag.

Parameters

NameTypeDescription
seriesseriesInput series.

Return value

series

For developers
  • MQL5 MathSign.

Example

oscillator
plot sign(close - close[1]) as "Dir"
level 0 as "Zero" gray

See also

  • abs
  • max
  • min
  • round
  • floor
  • ceil
  • sqrt
  • log
← logpow →