Good afternoon,
Is there a way to define variable by symbol in watchlist column?
Im having issue to setting some active market times for Futures.
Something like:
If symbol= /GC {
def rthstart = 0800;
def rthend = 1300;
} else if symbol = /ES {
def rthstart = 0930;
def rthend = 1600;
}
EDIT:
Or is there maybe a way to completly disable extended hours on Daily studies?
EDIT2:
I tried this:
def rthstart = if getSymbol() == ("/GC") then 0800
else if getSymbol() == ("/6J") then 0800
else 0930;
def rthend = if getSymbol() == ("/GC") then 1300
else if getSymbol() == ("/6J") then 1430
else 1600;
No errors but i dont think it works.
Thank you!
Is there a way to define variable by symbol in watchlist column?
Im having issue to setting some active market times for Futures.
Something like:
If symbol= /GC {
def rthstart = 0800;
def rthend = 1300;
} else if symbol = /ES {
def rthstart = 0930;
def rthend = 1600;
}
EDIT:
Or is there maybe a way to completly disable extended hours on Daily studies?
EDIT2:
I tried this:
def rthstart = if getSymbol() == ("/GC") then 0800
else if getSymbol() == ("/6J") then 0800
else 0930;
def rthend = if getSymbol() == ("/GC") then 1300
else if getSymbol() == ("/6J") then 1430
else 1600;
No errors but i dont think it works.
Thank you!
Last edited: