// Function to check if a number is divisible by 2 or 3
isDivisibleBy2Or3(inputNumber) =>
isDivisibleBy2 = false
isDivisibleBy3 = false
// Check if the number is divisible by 2
if (inputNumber % 2 == 0 and barstate.islast)
isDivisibleBy2 := true
// Check if the number is divisible by 3
if (inputNumber % 3 == 0 and barstate.islast)
isDivisibleBy3 := true
[isDivisibleBy2, isDivisibleBy3]
isDivisibleBy2Or3(inputNumber) =>
isDivisibleBy2 = false
isDivisibleBy3 = false
// Check if the number is divisible by 2
if (inputNumber % 2 == 0 and barstate.islast)
isDivisibleBy2 := true
// Check if the number is divisible by 3
if (inputNumber % 3 == 0 and barstate.islast)
isDivisibleBy3 := true
[isDivisibleBy2, isDivisibleBy3]