The problem with using the current bar is that it is not formed so the conditions are evaluated at the open of the bar, and many ticks are received after that. SO at the open you can have hull1>hull2, but the next tick is hull1<hull2, so you have many false signals if you trade ticks
During development what we do is use shift=1 or previous bar and then when we are done testing we change it to shift=0
I would try to find a better hull indicator. I think this one repaints. It also uses 2 signals so you need to use one for sell and one for buy (mode 0 and mode 1). The signals work as signal 1 is on while 2 is off, and vice versa.
Please start reading this first to understand about the custom indicators:
viewtopic.php?f=3&t=162There is a post there with another hull indicator