How to Turn Off Extended Hours in ThinkorSwim

masonbarnard

New member
How do I exclude after-hours or premarket session orders from triggering in a custom think script? I only want the orders to "trigger" intraday (open to close)

The strategy is simply premarket high long, moving average exit, and a custom stop.
 
Solution
To turn off extended hours and pre-market data from your ThinkorSwim chart:
  1. Go to your chart's settings
  2. Click on Equities
  3. Uncheck "Show Extended Hours Trading session"
  4. Click Ok
95FPsc5.png

ProfessorZoom

New member
Hello. Is it possible to check via ThinkScript if the user has extended hours on or off on the chart? I have a study that should only be used when extended hours is off, and want to display a red error label if the user has extended hours on. Is this possible? If so, is it possible to turn it off via ThinkScript as well? I'm unable to find any documentation on this.
 

BenTen

Administrative
Staff member
Staff
VIP
To turn off extended hours and pre-market data from your ThinkorSwim chart:
  1. Go to your chart's settings
  2. Click on Equities
  3. Uncheck "Show Extended Hours Trading session"
  4. Click Ok
95FPsc5.png
 
Solution

Welkin

Active member
VIP
@ProfessorZoom You can't disable ETH through thinkscript, but it is possible to perform a check and provide a warning label to disable ETH

Code:
#ETH Check
def ethTimeSample = 0929;
def ethTest = if SecondsFromTime(ethTimeSample) == 0 then 1 else ethTest[1];
AddLabel(ethTest,"Disable Extended Trading Hours", Color.RED);
 

Similar threads

Top