crackedtrading
New member
I have a script that looks at yesterday's High, Low, Close and Open:
The solution is simple:
Question:
How can I tell ThinkorSwim to read "Open("period" = Aggregation.DAY) from 0 bars ago" before 9:30am (during premarket) and to read "Open("period" = Aggregation.DAY) from 1 bars ago" after 9:30am market open?
The problem is, ThinkorSwim doesn't identify it as "yesterday" until 9:30am.Open("period" = Aggregation.DAY) from 1 bars ago
The solution is simple:
But the problem with this solution is that after 9:30am, ThinkorSwim uses today's values to populate the script.Open("period" = Aggregation.DAY) from 0 bars ago
Question:
How can I tell ThinkorSwim to read "Open("period" = Aggregation.DAY) from 0 bars ago" before 9:30am (during premarket) and to read "Open("period" = Aggregation.DAY) from 1 bars ago" after 9:30am market open?