Have you applied the script to a chart to confirm it is doing what you expect it to there? That’s the first step.
If the script is working as expected (or once you’ve adjusted it to work as you want), i’d suggest not adding it to the Stops section in the back tester, it’s designed for basic stops only. Instead add it to the Exits section and place an OR between it and the other exit criteria you’ve setup.
Yes, I have tried to apply the ATRTSCAN script as above to a Show Plot and it shows nothing - I seem to remember reading somewhere that ATRTSCAN will only work in the Stops section of the Backtester.
Below is the working script I use on my charts for the trailing stop:-
But, the trailing stop is dependent on the START date, so how do I code the START date to automatically reflect the different dates of entry in the Backtester?