xor logical operator
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © TheSocialCryptoClub

//@version=5

// @description: this library provides xor logical operator to Pine Script
library("xor")

// @function xor: Exclusive or, or exclusive disjunction is a logical operation that is true if and only if its arguments differ (one is true, the other is false).
// @param a first argument
// @param b second argument
// @returns returns xor (true only if a and b are true, but not both)
export xor(bool a, bool b) =>
	(a and not b) or (not a and b)

