Entry above signal bar high

Hi there, I’m after a script that enters a trade 0.01 above the signal bar high, and only if price doesn’t drop below the signal bar low before an entry is triggered. When I backtest with the current available scripts using the signal function it triggers the entry at the open of the signal bar or next bar’s open, which is not an accurate entry as the signal hadn’t occurred at the open. For example, if a bar closing above a moving average is the signal, I need a script that triggers an entry above that signal bar high on the following bars. I assume that same script could be modified for an exit when a bar closes below a moving average. I’ll attach an example.

Any help is appreciated.

Cheers, Matt