Is there an existing script for back testing "trailing stops percentage" for long stocks? I am looking to enter the date and time to back test and enter the signal/entry price and a trailing stop percent. Showing the result of the trailing stop fill price and time!
Sadly no.
ThinkScript cannot:
rewind history bar‑by‑bar from an arbitrary timestamp
simulate a trailing stop without circular state dependencies
guarantee bar‑close‑only updates without repainting
store and replay a historical entry event reliably, as it lacks an array function.
Therefore, Thinkorswim cannot simulate a historical trailing stop from a user‑selected timestamp.