Would anyone help add code to this current Globex High and Low indicator so that it only draws lines for current day Globex only. As is the code draws lines on days in the past. I just need the current day. Thanks!
Here is the code:
# TS_GlobexRange
# http://thinkscripter.wordpress.com
# [email protected]
# Last Update 18 JUL 2009
input bubbles = yes;
input bubblemover = 4;
def b =bubblemover;
def b1 = b + 1;
input Globex_Open = 1800;
input Globex_Close = 0929;
def globexOpen = if(secondsFromTime(Globex_Open) >= 0 or secondsTillTime(Globex_Close)>=0, 1, 0);
def globexReset = if globexOpen and !globexOpen[1] then 1 else 0;
rec globexHigh = compoundValue(1, if((high > globexHigh[1] and globexOpen) or globexReset, high,globexHigh[1]),high);
rec globexLow = compoundValue(1, if((low < globexLow[1] and globexOpen) or globexReset, low,globexLow[1]),low);
plot Globex_High = globexHigh;
Globex_high.SetStyle(curve.LONG_DASH);
Globex_High.SetDefaultColor(color.green);
Globex_High.setLineWeight(2);
plot Globex_Low = globexLow;
Globex_Low.SetStyle(curve.LONG_DASH);
Globex_Low.SetDefaultColor(color.red);
Globex_Low.setLineWeight(2);
input showbubble_left = yes;
AddChartBubble(IsNaN(showbubble_left and close[-1]) and !IsNaN(close),Globex_High, "GX High", Color.Light_Green);
AddChartBubble(IsNaN(showbubble_left and close[-1]) and !IsNaN(close),Globex_Low, "GX Low", Color.Red,0);
Here is the code:
# TS_GlobexRange
# http://thinkscripter.wordpress.com
# [email protected]
# Last Update 18 JUL 2009
input bubbles = yes;
input bubblemover = 4;
def b =bubblemover;
def b1 = b + 1;
input Globex_Open = 1800;
input Globex_Close = 0929;
def globexOpen = if(secondsFromTime(Globex_Open) >= 0 or secondsTillTime(Globex_Close)>=0, 1, 0);
def globexReset = if globexOpen and !globexOpen[1] then 1 else 0;
rec globexHigh = compoundValue(1, if((high > globexHigh[1] and globexOpen) or globexReset, high,globexHigh[1]),high);
rec globexLow = compoundValue(1, if((low < globexLow[1] and globexOpen) or globexReset, low,globexLow[1]),low);
plot Globex_High = globexHigh;
Globex_high.SetStyle(curve.LONG_DASH);
Globex_High.SetDefaultColor(color.green);
Globex_High.setLineWeight(2);
plot Globex_Low = globexLow;
Globex_Low.SetStyle(curve.LONG_DASH);
Globex_Low.SetDefaultColor(color.red);
Globex_Low.setLineWeight(2);
input showbubble_left = yes;
AddChartBubble(IsNaN(showbubble_left and close[-1]) and !IsNaN(close),Globex_High, "GX High", Color.Light_Green);
AddChartBubble(IsNaN(showbubble_left and close[-1]) and !IsNaN(close),Globex_Low, "GX Low", Color.Red,0);