Tick Gaps
// This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © JackDL92

//@version=5
indicator("Tick Gaps", overlay=true)

// Input for symbol type
symbolType = input("triangleup", title="Symbol Type")

// Function to check for gap-up
isGapUp(open, close) =>
    open > close[1]

// Function to check for gap-down
isGapDown(open, close) =>
    open < close[1]

// Plot symbols for gap-ups
plotshape(series=isGapUp(open, close), title="Gap Up", color=color.new(color.green, 0), style=shape.triangleup, size=size.small, location=location.belowbar)

// Plot symbols for gap-downs
plotshape(series=isGapDown(open, close), title="Gap Down", color=color.new(color.red, 0), style=shape.triangledown, size=size.small, location=location.abovebar)
