Hello,
I have extensive experience in TradeStation, ThinkOrSwim and other trading platforms programming including converting indicators and strategies. You can see examples in my portfolio and completed projects list. I can send you more examples.
I can convert the attached code to TradeStation.
Best wishes,
Alexander