Condition Wizard to only trade during Market Hours


Category:
0
0

I’m trying to create a script that will only execute my conditional order strategy between 9:30 and 4.   Can you recommend how to insert that into Thinkscript in a way I can also use in a conditional order?  Also, I want the order to close before 4, regardless of all other conditions.  Is that possible?  Thanks

Marked as spam
Posted by (Questions: 2, Answers: 0)
Asked on April 28, 2020 8:51 pm
100 views
0
Private answer

The solution you are seeking is actually handled further upstream. Screenshot below shows where the time of execution is controlled. This has absolutely nothing to do with the code.

As to automatically exiting at market close. No. Once you are in a position you must manually enter an order that gets you out before market close. There is no way to set that to occur automatically at the time you execute the entry.

Attachments:
Marked as spam
Posted by (Questions: 37, Answers: 4087)
Answered on April 28, 2020 9:15 pm