Hello everyone, love this community and scroll through the website countless times throughout the day. Thanks to everyone who makes this possible. I was wondering if its possible to have an indicator plot only during regular trading hours. I use the strat but find the numbers kind of distracting in the premarket so if someone could help me where the indicator will plot the numbers ONLY during regular trading hours that would be so fantastic. Thank you.
Code:
# +------------------------------------------------------------+
# | Example code to print values below candles |
# | Robert Payne |
# | https://funwiththinkscript.com |
# +------------------------------------------------------------+
def H = high;
def L = low;
def C = close;
def O = open;
def insideBar = (H < H[1] and L > L[1]) or (H == H[1] and L > L[1]) or (H < H[1] and L == L[1]) or (H == H[1] and L == L[1]);
def outsideBar = H > H[1] and L < L[1];
plot barType1 = if insideBar then 1 else double.nan;
barType1.SetPaintingStrategy(PaintingStrategy.VALUES_ABOVE);
plot barType2 = if outsideBar then 3 else double.nan;
barType2.SetPaintingStrategy(PaintingStrategy.VALUES_BELOW);