I'm working on a script to backtest a simple pullback strategy for daytrading, but I'm not sure how to fully implement this in Thinkscript.
The image shows high and low swings indicated by pink and white arrows.
The general idea is to enter a Long position after a pullback to (hopefully) catch the next run up, and attempt to exit somewhere near the top. How I want the script to behave is to enter the trade at the second white arrow during the trading day if the closing price is above the first white arrow. The second white arrow must come after a pink arrow (if there is no pink arrow between the white arrows, then no entry).
Where I need help with is figuring out how to make the script enter the trade in Think Script. I think I need a way to store and recall the closing price at each arrow so that I can compare the price between arrows. And a way to check if there's been a pink arrow between the two white arrows. I should be able to figure out the exit conditions without too much trouble