You can craete a boolen variable (I called it trail_active) with an initial value of false. Then do this on the 'on Trade' tab.
0_1591202317856_01.png
And then this on the 'on Tick' tab:
0_1591202432596_02.png
And finally reinitialize the value of the variable to 'false' again when you need it.