See below script that can be used to make a custom scan filter in the TOS Stock or Options Hacker.
TTM_ScalperAlert("min swing" = 0.1)."PivotHigh" is true within 5 bars
TTM_ScalperAlert("min swing" = 0.1)."PivotLow" is true within 5 bars
Use at least 5 bars because the study is looking for a confirmation bar for the trigger bar, ie. delayed signal.
About - Scalper Alert
Create a custom scan filter in TOS
TOS - Setting up scan criteria in the Stock or Option Hacker in Thinkorswim